dot-s:tools — ordinary primitive

FORTH

**.S**
( -- )(`)`

;

p4:"dot-s";

print the stack content in vertical nice format. tries to show cell-stack and float-stack side-by-side,

Depending on configuration, there are two parameter stacks: for integers and for floating point operations. If both stacks are empty, .S will display the message <code><stacks empty></code>.

If only the floating point stack is empty, .S displays the integer stack items in one column, one item per line, both in hex and in decimal like this (the first item is topmost):

12345 HEX 67890 .S 424080 [00067890] 12345 [00003039] ok

If both stacks ar not empty, .S displays both stacks, in two columns, one item per line

HEX 123456.78E90 ok DECIMAL 123456.78E90 .S 291 [00000123] 1.234568E+95 1164414608 [45678E90] ok

Confusing example? Remember that floating point input only works when the BASE number is DECIMAL. The first number looks like a floating point but it is a goodhex double integer too - the number base is HEX. Thus it is accepted as a hex number. Second try with a decimal base will input the floating point number.

If only the integer stack is empty, .S shows two columns, but he first columns is called <tt><stack empty></tt>, and the second column is the floating point stack, topmost item first.

dpANS 15.6.1.0220 - standard forth word