P4_F_TRUNC_TO_S(3)

NAME
p4_f_trunc_to_s - FTRUNC>S (f: x -- s: n )

SYNOPSIS

#include <pfe/floating-mix.h>

FCode p4_f_trunc_to_s(---);

DESCRIPTION

The word F>S was sometimes defined with a different behavior than FTRUNC>S which is the type-cast behaviour of C according to C99 section 6.3.1.4 - truncation would also match the ANS-Forth specification for F>D.

Some systems used F>S defined to FROUND>S instead. The pfe provides explicit words for both conversions, the word FROUND>S and FTRUNC>S which return single-cell parameters for a floating point number with the conversion method of FTRUNC or FROUND.

In PFE, F>S is a synonym pointing to FTRUNC>S in analogy of the behavior of F>D where no explicit word exists. The inverse of F>S is the cast conversion of S>F.

AUTHOR

    • Guido U. Draheim (modified by $Author: guidod $)

COPYRIGHT

Copyright (C) Tektronix, Inc. 1998 - 2003. Copyright (C) 2005 - 2008 Guido U. Draheim <guidod@gmx.de>