6.20.1 Simple numeric output

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).

. ( n –  ) core “dot”

Display (the signed single number) n in free-format, followed by a space.

dec. ( n –  ) gforth-0.2 “dec.”

Display n as a signed decimal number, followed by a space.

doc-hex.

u. ( u –  ) core “u-dot”

Display (the unsigned single number) u in free-format, followed by a space.

.r ( n1 n2 –  ) core-ext “dot-r”

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 “-”.

u.r ( u n –  ) core-ext “u-dot-r”

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.

dec.r ( u n –  ) gforth-0.5 “dec.r”

Display u as a unsigned decimal number in a field n characters wide.

d. ( d –  ) double “d-dot”

Display (the signed double number) d in free-format. followed by a space.

ud. ( ud –  ) gforth-0.2 “u-d-dot”

Display (the signed double number) ud in free-format, followed by a space.

d.r ( d n –  ) double “d-dot-r”

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 “-”.

ud.r ( ud n –  ) gforth-0.2 “u-d-dot-r”

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.