The simplest output functions are those that display numbers from the
data stack. Numbers are displayed in the base (aka radix) stored in
base
(see Number Conversion).
Display (the signed single number) n in free-format, followed by a space.
Display n as a signed decimal number, followed by a space.
Display u as an unsigned hex number, prefixed with a "$" and followed by a space.
Display u as an unsigned hex number, prefixed with a
$
and followed by a space. Another name for this word
is h.
, which is present in several other systems, but
not in Gforth before 1.0.
Display (the unsigned single number) u in free-format, followed by a space.
Display n1 right-aligned in a field n2 characters wide. If more than n2 characters are needed to display the number, all digits are displayed. If appropriate, n2 must include a character for a leading “-”.
Display u right-aligned in a field n characters wide. If more than n characters are needed to display the number, all digits are displayed.
Display u as a unsigned decimal number in a field n characters wide.
Display (the signed double number) d in free-format. followed by a space.
Display (the signed double number) ud in free-format, followed by a space.
Display d right-aligned in a field n characters wide. If more than n characters are needed to display the number, all digits are displayed. If appropriate, n must include a character for a leading “-”.
Display ud right-aligned in a field n characters wide. If more than n characters are needed to display the number, all digits are displayed.