Previous: Integer to string conversion, Up: Number conversion [Contents][Index]
f>str-rdp ( rf +nr +nd +np – c-addr nr ) gforth-0.6 “f-to-str-rdp”
Convert rf into a string at c-addr nr. The conversion
rules and the meanings of nr +nd np are the same as for
f.rdp (see Floating-point output). The result is in in
the pictured numeric output buffer and will be destroyed by
anything overwriting that buffer.
f>buf-rdp ( rf c-addr +nr +nd +np – ) gforth-0.6 “f-to-buf-rdp”
Convert rf into a string at c-addr nr. The conversion
rules and the meanings of nr nd np are the same as for
f.rdp (see Floating-point output).
There is also a primitive used for implementing the higher-level FP-to-string and FP output words:
represent ( r c-addr u – n f1 f2 ) floating “represent”
Convert the decimal significand (aka mantissa) of r into a string in buffer c-addr u; n is the exponent, f1 is true if r is negative, and f2 is true if r is valid (a finite number in Gforth).