diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-10-21 11:58:47 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-10-21 11:58:47 +0000 |
commit | e0d555f96f019382ff04e01e8bf9b00a3e033ebb (patch) | |
tree | 126634df82d3bac7dc269990823eb19c2468543a /usr.bin/bc | |
parent | 091ed9c60a0a4400e5ee515299114f2e75798758 (diff) |
Document continue and for with empty parts. Also, our implementation
allows for scale > 99.
Diffstat (limited to 'usr.bin/bc')
-rw-r--r-- | usr.bin/bc/USD.doc/bc | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/usr.bin/bc/USD.doc/bc b/usr.bin/bc/USD.doc/bc index ac7e633a52a..91832f367fc 100644 --- a/usr.bin/bc/USD.doc/bc +++ b/usr.bin/bc/USD.doc/bc @@ -1,4 +1,4 @@ -.\" $OpenBSD: bc,v 1.2 2003/10/19 18:16:51 otto Exp $ +.\" $OpenBSD: bc,v 1.3 2003/10/21 11:58:46 otto Exp $ .\" .\" Copyright (C) Caldera International Inc. 2001-2002. .\" All rights reserved. @@ -285,10 +285,14 @@ A third special internal quantity called `scale' is used to determine the scale of calculated quantities. Numbers may have -up to 99 decimal digits after the decimal point. +up to a specific number of decimal digits after the decimal point. This fractional part is retained in further computations. We refer to the number of digits after the decimal point of a number as its scale. +The current implementation allows scales to be as large as can be +represented by a 32-bit unsigned number minus one. +This is a non-portable extension. +The original implementation allowed for a maximum scale of 99. .PP When two scaled numbers are combined by means of one of the arithmetic operations, the result @@ -318,9 +322,7 @@ not rounding is performed. .PP The contents of `scale' must be no greater than -99 and no less than 0. It is initially set to 0. -In case you need more than 99 fraction digits, you may arrange -your own scaling. +4294967294 and no less than 0. It is initially set to 0. .PP The internal quantities `scale', `ibase', and `obase' can be used in expressions just like other variables. @@ -775,7 +777,7 @@ The following are reserved keywords: sqrt auto length return while quit - for + for continue .fi .ft .NH 2 @@ -1103,7 +1105,8 @@ The for statement is the same as .ft R .fi .PP -All three expressions must be present. +All three expressions may be left out. +This is a non-portable extension. .NH 2 Break statements .sp .5 @@ -1111,6 +1114,18 @@ Break statements .PP \fBbreak\fP causes termination of a \fBfor\fP or \fBwhile\fP statement. .NH 2 +Continue statements +.sp .5 +\fBcontinue\fP +.PP +\fBcontinue\fP causes the next iteration of a \fBfor\fP or \fBwhile\fP +statement to start, skipping the remainder of the loop. +For a \fBwhile\fP statement, execution continues with the evaluation +of the condition. +For a \fBfor\fP statement, execution continues with evaluation of +the last-expression. +The \fBcontinue\fP statement is a non-portable extension. +.NH 2 Auto statements .sp .5 \fBauto \fIidentifier\fR\|[\|\fB,\fIidentifier\fR\|] |