diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
| commit | 6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch) | |
| tree | 314123bcab78ff295f38f85f31dc141e5fe22d15 /man/1/sh-expr | |
| parent | 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff) | |
20061220
Diffstat (limited to 'man/1/sh-expr')
| -rw-r--r-- | man/1/sh-expr | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/man/1/sh-expr b/man/1/sh-expr index b640e339..976e6c04 100644 --- a/man/1/sh-expr +++ b/man/1/sh-expr @@ -18,23 +18,26 @@ expr, ntest \- shell module for simple arithmetic. .I num .br .SH DESCRIPTION -.B Expr +.I Expr is a loadable module for .IR sh (1) that provides support for simple integer arithmetic. It provides one command, -.BR ntest , +.IR ntest , which performs a simple boolean test on its integer argument, and the substitution operator -.BR expr , +.IR expr , which takes an expression in Reverse Polish notation, and yields its result. -.B Ntest +.PP +.I Ntest returns true if its argument .I num -is non-zero. -.B Expr +is non-zero, +and false otherwise. +.PP +.I Expr evaluates each .I arg in turn; if it is an integer it gets pushed onto @@ -50,7 +53,7 @@ yields 1, not -1. Alternative names are given for some operators; this is to avoid the necessity of quoting operators that contain -.I sh +.IR sh (1) metacharacters. All operations use 64-bit signed integers; integers are given in the same form acceptable to Limbo. The relational operators yield either @@ -59,10 +62,10 @@ to Limbo. The relational operators yield either option is given, .I radix specifies an output base for numbers yielded by -.BR expr . +.IR expr . Numbers are printed in a form suitable for re-interpretation by -.BR expr . +.IR expr . .PP When all its arguments have been evaluated, .B expr |
