Article pages now have a discussion option at the bottom (moderated/captcha, but no registration needed)

Arithmetic evaluation (command)

Synopsis

(( <EXPRESSION> ))

Description

This command evaluates the arithmetic expression <EXPRESSION>.

If the expression evaluates to 0 then the exit code of the expression is set to 1 (FALSE). If the expression evaluates to something else than 0, then the exit code of the expression is set to 0 (TRUE).

This is done to map the arithmetic "true" and "false" to the shell exit codes for TRUE and FALSE.

The functionality basically is equivalent to what the ''let'' builtin command does. The arithmetic evaluation compound command should be preferred.

Examples

Portability considerations

See also

Discussion

Enter your comment
 
syntax/ccmd/arithmetic_eval.txt · Last modified: 2010/04/24 21:12 by thebonsai
GNU Free Documentation License 1.2
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0