F>S

( -- n ) ( F: r -- ) or ( r -- n )

n is the single-cell signed-integer equivalent of the integer portion of r. The fractional portion of r is discarded. An ambiguous condition exists if the integer portion of r cannot be represented as a single-cell signed integer.

Note:

Rounding the floating-point value prior to calling F>S is advised, because F>S rounds towards zero.

See:

Implementation:

: F>S ( r -- n )
   F>D D>S
;

ContributeContributions