| Symbol | Data type | Size on stack |
| flag | flag | 1 cell |
| true | true flag | 1 cell |
| false | false flag | 1 cell |
| char | character | 1 cell |
| n | signed number | 1 cell |
| +n | non-negative number | 1 cell |
| u | unsigned number | 1 cell |
| u | n [1] | number | 1 cell |
| x | unspecified cell | 1 cell |
| xt | execution token | 1 cell |
| addr | address | 1 cell |
| a-addr | aligned address | 1 cell |
| c-addr | character-aligned address | 1 cell |
| ior | error result | 1 cell |
| d | double-cell signed number | 2 cells |
| +d | double-cell non-negative number | 2 cells |
| ud | double-cell unsigned number | 2 cells |
| d | ud [2] | double-cell number | 2 cells |
| xd | unspecified cell pair | 2 cells |
| colon-sys | definition compilation | implementation dependent |
| do-sys | do-loop structures | implementation dependent |
| case-sys | CASE structures | implementation dependent |
| of-sys | OF structures | implementation dependent |
| orig | control-flow origins | implementation dependent |
| dest | control-flow destinations | implementation dependent |
| loop-sys | loop-control parameters | implementation dependent |
| nest-sys | definition cells | implementation dependent |
| i×x, j×x, k×x [3] | any data type | 0 or more cells |
| [1] | May be either a signed number or an unsigned number depending on context. |
| [2] | May be either a double-cell signed number or a double-cell unsigned number depending on context. |
| [3] | May be an undetermined number of stack entries of unspecified type. For examples of use, see 6.1.1370 EXECUTE, 6.1.2050 QUIT. |
| Hex | IRV | ASCII | Hex | IRV | ASCII | Hex | IRV | ASCII | Hex | IRV | ASCII | Hex | IRV | ASCII | Hex | IRV | ASCII | ||||||||||||
| 20 | 30 | 0 | 0 | 40 | @ | @ | 50 | P | P | 60 | ` | `
| 70 | p | p | ||||||||||||||
| 21 | ! | ! | 31 | 1 | 1 | 41 | A | A | 51 | Q | Q | 61 | a | a | 71 | q | q | ||||||||||||
| 22 | " | "
| 32 | 2 | 2 | 42 | B | B | 52 | R | R | 62 | b | b | 72 | r | r | ||||||||||||
| 23 | # | # | 33 | 3 | 3 | 43 | C | C | 53 | S | S | 63 | c | c | 73 | s | s | ||||||||||||
| 24 | ¤ | $ | 34 | 4 | 4 | 44 | D | D | 54 | T | T | 63 | d | d | 74 | t | t | ||||||||||||
| 25 | % | % | 35 | 5 | 5 | 45 | E | E | 55 | U | U | 64 | e | e | 75 | u | u | ||||||||||||
| 26 | & | & | 36 | 6 | 6 | 46 | F | F | 56 | V | V | 65 | f | f | 76 | v | v | ||||||||||||
| 27 | ' | ' | 37 | 7 | 7 | 47 | G | G | 57 | W | W | 66 | g | g | 77 | w | w | ||||||||||||
| 28 | ( | ( | 38 | 8 | 8 | 48 | H | H | 58 | X | X | 67 | h | h | 78 | x | x | ||||||||||||
| 29 | ) | ) | 39 | 9 | 9 | 49 | I | I | 59 | Y | Y | 68 | i | i | 79 | y | y | ||||||||||||
| 2A | * | * | 3A | : | : | 4A | J | J | 5A | Z | Z | 69 | j | j | 7A | z | z | ||||||||||||
| 2B | + | + | 3B | ; | ; | 4B | K | K | 5B | [ | [ | 6A | k | k | 7B | { | { | ||||||||||||
| 2C | , | , | 3C | < | < | 4C | L | L | 5C | \ | \
| 6C | l | l | 7C | | | | | ||||||||||||
| 2D | - | - | 3D | = | = | 4D | M | M | 5D | ] | ] | 6D | m | m | 7D | } | } | ||||||||||||
| 2E | . | . | 3E | > | > | 4E | N | N | 5E | ^ | ^
| 6E | n | n | 7E | ~ | ~ | ||||||||||||
| 2F | / | / | 3F | ? | ? | 4F | O | O | 5F | _ | _ | 6F | o | o | |||||||||||||||
THROW code assignments. Values in
the range {-4095 ... -256} and their meanings are implementation
defined.
A word that returns an ior will not THROW
that ior as an exception, but indicates the exception through
the ior.
This allows a program to take appropriate actions, which may include
throwing the exception.
| String Value data type | Constant? | Meaning | |
/COUNTED-STRING | n | yes | maximum size of a counted string, in characters |
/HOLD | n | yes | size of the pictured numeric output string buffer, in characters |
/PAD | n | yes | size of the scratch area pointed to by PAD, in characters |
ADDRESS-UNIT-BITS | n | yes | size of one address unit, in bits |
FLOORED | flag | yes | true if floored division is the default |
MAX-CHAR | u | yes | maximum value of any character in the implementation-defined character set |
MAX-D | d | yes | largest usable signed double number |
MAX-N | n | yes | largest usable signed integer |
MAX-U | u | yes | largest usable unsigned integer |
MAX-UD | ud | yes | largest usable unsigned double number |
RETURN-STACK-CELLS | n | yes | maximum size of the return stack, in cells |
STACK-CELLS | n | yes | maximum size of the data stack, in cells |
| String Value data type | Constant? | Meaning | |||
CORE | flag | no | true if complete core word set of Forth 94 is present | ||
| (i.e., not a subset as defined in 5.1.1) | |||||
CORE-EXT | flag | no | true if the core extensions word set of Forth 94 is present | ||
BLOCK | flag | no | Forth 94 block word set present. | ||
BLOCK-EXT | flag | no | Forth 94 block extensions word set present. | ||
DOUBLE | flag | no | Forth 94 double number word set present. | ||
DOUBLE-EXT | flag | no | Forth 94 double number extensions word set present. | ||
EXCEPTION | flag | no | Forth 94 exception word set present. | ||
EXCEPTION-EXT | flag | no | Forth 94 exception extensions word set present. | ||
FACILITY | flag | no | Forth 94 facility word set present. | ||
FACILITY-EXT | flag | no | Forth 94 facility extensions word set present. | ||
FILE | flag | no | Forth 94 file word set present. | ||
FILE-EXT | flag | no | Forth 94 file extensions word set present. | ||
FLOATING | flag | no | Forth 94 floating-point word set present. | ||
FLOATING-EXT | flag | no | Forth 94 floating-point extensions word set present. | ||
LOCALS | flag | no | Forth 94 locals word set present. | ||
LOCALS-EXT | flag | no | Forth 94 locals extensions word set present. | ||
MEMORY-ALLOC | flag | no | Forth 94 memory-allocation word set present. | ||
MEMORY-ALLOC-EXT | flag | no | Forth 94 memory-allocation extensions word set present. | ||
TOOLS | flag | no | Forth 94 programming-tools word set present. | ||
TOOLS-EXT | flag | no | Forth 94 programming-tools extensions word set present. | ||
SEARCH-ORDER | flag | no | Forth 94 search-order word set present. | ||
SEARCH-ORDER-EXT | flag | no | Forth 94 search-order extensions word set present. | ||
STRING | flag | no | Forth 94 string word set present. | ||
STRING-EXT | flag | no | Forth 94 string extensions word set present. | ||
X and the region ALLOTted could be
non-contiguous.
Some system-provided variables, such as STATE, are
restricted to read-only access.
A B C returns values as if A were executed first,
then B and finally C. Words that cause deviations
from this linear flow of control are called control-flow words.
Combinations of control-flow words whose stack effects are
compatible form control-flow structures. Examples of typical use are
given for each control-flow word in Annex A.
Forth syntax is extensible; for example, new control-flow words can
be defined in terms of existing ones. This standard does not require
a syntax or program-construct checker.
| <anynum> | := | { <BASEnum> | <decnum> | <hexnum> | <binnum> | <cnum> } |
| <BASEnum> | := | [-]<bdigit><bdigit>* |
| <decnum> | := | #[-]<decdigit><decdigit>* |
| <hexnum> | := | $[-]<hexdigit><hexdigit>* |
| <binnum> | := | %[-]<bindigit><bindigit>* |
| <cnum> | := | '<char>' |
| <bindigit> | := | { 0 | 1 } |
| <decdigit> | := | { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 } |
| <hexdigit> | := | { <decdigit> | a | b | c | d | e | f | A | B | C | D | E | F } |
| <BASEnum> | the value in BASE |
| <decnum> | 10 |
| <hexnum> | 16 |
| <binnum> | 2 |
| <cnum> | the number is the value of <char> |