/* test_numout.c -- `.` `U.` `D.` `.R` `U.R` `D.R` and SPACES, executed. * * DECOMPOSITION.md 5.8 and 5.10. The number-printing words are pictured * output (test_pictured.c) handed to TYPE (test_terminal.c), so this file * assembles both sets again, opcode for opcode, on a node of its own with * the console attached, and reads back what was printed. * * v3 (v3/src/word_source/format_words.c, io_words.c): * . U. the number in the current base, then one space * .R U.R ( n width -- ) the number right-justified in `width` * columns; a number wider than the field is printed whole; * width <= 0 pads nothing. No space after it: that is the * FORTH-79 reference word (ruled 2026-10-04); v3 printed one. * D. D.R the same for a double * SPACES ( n -- ) n spaces, none for n <= 0 * * Where v4 parts from v3, as 5.8 already rules for pictured output: * - a double is ( lo hi ), high cell on top; v3's D. took the low cell on * top; * - D. prints the whole double; v3 printed "DOUBLE-OVERFLOW" unless the * double fitted one signed cell, and agrees with v4 whenever it does; * - the number is built in the 63-character hold buffer (D-13), so a * number longer than that loses its leading characters and sets * NODE-ERROR. v3 printed from a private 80-character buffer. * * Six transcripts of the real v3 binary are recorded below as expected * output. They were taken on 2026-10-03 from * printf '