version 1.71, 2000/08/14 21:15:01
|
version 1.72, 2000/08/15 20:25:07
|
Line 7469 floating-point number.
|
Line 7469 floating-point number.
|
There is a word @code{bin} but it does @i{not} set the number base! |
There is a word @code{bin} but it does @i{not} set the number base! |
It is used to specify file types. |
It is used to specify file types. |
@item |
@item |
ANS Forth requires the @code{.} of a double-precision number to |
ANS Forth requires the @code{.} of a double-precision number to be the |
be the final character in the string. Allowing the @code{.} to be |
final character in the string. Gforth allows the @code{.} to be |
anywhere after the first digit is a Gforth extension. |
anywhere after the first digit. |
@item |
@item |
The number conversion process does not check for overflow. |
The number conversion process does not check for overflow. |
@item |
@item |
In Gforth, number conversion to floating-point numbers always use base |
In an ANS Forth program @code{base} is required to be decimal when |
10, irrespective of the value of @code{base}. In ANS Forth, |
converting floating-point numbers. In Gforth, number conversion to |
conversion to floating-point numbers whilst the value of |
floating-point numbers always uses base &10, irrespective of the value |
@code{base} is not 10 is an ambiguous condition. |
of @code{base}. |
@end itemize |
@end itemize |
|
|
You can read numbers into your programs with the words described in |
You can read numbers into your programs with the words described in |
Line 7512 Directives}).
|
Line 7512 Directives}).
|
@c as it is helpful for showing what is and what is not portable, particularly |
@c as it is helpful for showing what is and what is not portable, particularly |
@c where it outlaws a style in common use. |
@c where it outlaws a style in common use. |
|
|
|
@c anton: it's more important to show what's portable. After we have done |
|
@c that, we can also show what's not. In any case, I intend to write a |
|
@c section Macros (or so) which will also deal with [ ]. |
|
|
@code{[} and @code{]} also give you the ability to switch into compile |
@code{[} and @code{]} also give you the ability to switch into compile |
state and back, but we cannot think of any useful Standard application |
state and back, but we cannot think of any useful Standard application |
Line 7622 doc-fliteral
|
Line 7625 doc-fliteral
|
@node Interpreter Directives, , Literals, The Text Interpreter |
@node Interpreter Directives, , Literals, The Text Interpreter |
@subsection Interpreter Directives |
@subsection Interpreter Directives |
@cindex interpreter directives |
@cindex interpreter directives |
|
@cindex conditional compilation |
|
|
These words are usually used in interpret state; typically to control |
These words are usually used in interpret state; typically to control |
which parts of a source file are processed by the text |
which parts of a source file are processed by the text |
Line 7631 to compensate for the fact that the non-
|
Line 7635 to compensate for the fact that the non-
|
used in compile state (@pxref{Control Structures}). Typical usages: |
used in compile state (@pxref{Control Structures}). Typical usages: |
|
|
@example |
@example |
FALSE Constant ASSEMBLER |
FALSE Constant HAVE-ASSEMBLER |
. |
. |
. |
. |
ASSEMBLER [IF] |
HAVE-ASSEMBLER [IF] |
: ASSEMBLER-FEATURE |
: ASSEMBLER-FEATURE |
... |
... |
; |
; |
Line 7643 ASSEMBLER [IF]
|
Line 7647 ASSEMBLER [IF]
|
. |
. |
: SEE |
: SEE |
... \ general-purpose SEE code |
... \ general-purpose SEE code |
[ ASSEMBLER [IF] ] |
[ HAVE-ASSEMBLER [IF] ] |
... \ assembler-specific SEE code |
... \ assembler-specific SEE code |
[ [ENDIF] ] |
[ [ENDIF] ] |
; |
; |