On Mar 29, 2:22=A0pm, Frank Buss <f...@[EMAIL PROTECTED]
> wrote:
> How do I redirect the output of f. to a string? It is just for testing,
so=
> f. is sufficient.
I think that depends on your system. For example if f. uses EMIT and
EMIT is a DEFER the solution would be obvious.
> In the future would be nice to have a function for better
> float formatting. Is there a general concept for redirecting the output
to=
> strings, like e.g. possible in Java, Lisp, C++ etc.?
You can do that if every output uses EMIT and EMIT is a DEFER.
> REPRESENT looks a bit like I could use it, but it is more complicated. I
> just need a function where I can specify the number of digits after the
> decimal point, e.g. like the C function sprintf(buf, "%.3f", number). I
> need it for FICL, so I could implement it myself in C, but would be nice
t=
o
> use Forth for it. Additional problem: FICL doesn't have REPRESENT.
I dont think that extra wordsets are very useful - they make things
complex. If you have the possibility to use EMIT as a DEFER,
everything else uses this EMIT, then you've everything in a FORTHish
way to do whatever you want.
-Helmar


|