https://github.com/jrincayc/ucblogo-code
Tip revision: 62fc2f7d6c41edcf685277a872c68e47a76fb254 authored by Dan Malec on 12 December 2020, 01:50:52 UTC
FEAT-CD: Initial pass at having a CD build.
FEAT-CD: Initial pass at having a CD build.
Tip revision: 62fc2f7
form
FORM num width precision
outputs a word containing a printable representation of "num",
possibly preceded by spaces (and therefore not a number for
purposes of performing arithmetic operations), with at least
"width" characters, including exactly "precision" digits after
the decimal point. (If "precision" is 0 then there will be no
decimal point in the output.)
As a debugging feature, (FORM num -1 format) will print the
floating point "num" according to the C printf "format", to allow
to hex :num
op form :num -1 "|%08X %08X|
end
to allow finding out the exact result of floating point operations.
The precise format needed may be machine-dependent.