[PicForth] abs MIA and 0 < strangeness?
Alex Holden
alex at linuxhacker.org
Tue Nov 23 20:39:16 CET 2004
The manual says that Picforth defines abs, and priotasker.fs makes use
of it, but it doesn't actually seem to exist in picforth.fs or any of
the libraries. Also the manual shows an example of how to write abs, but
either the example is wrong or Picforth's handling of the '0 <'
construct is wrong (in essence the result of '0 <' is always true). The
0< word works as expected though. A working (but not highly optimised)
abs is as follows:
: abs dup 0< if negate then ;
--
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer
More information about the PicForth
mailing list