by Gerry <gerry@[EMAIL PROTECTED]
>
Apr 2, 2008 at 12:29 PM
On 2 Apr, 14:29, Gerry <ge...@[EMAIL PROTECTED]
> wrote:
> I've just been trying out the revised Hayes tester from the Forth 200X
> web site (so it ought to be the latest version) and found a problem
> with compiling it with a system with no floating point.
>
> After the preliminaries the constants HAS-FLOATING and HAS-FLOATING-
> STACK both end up as FALSE.
>
> This leads to the system trying to compile the following
>
> =A0 =A0 DECIMAL
> =A0 =A0 : COMPUTE-CELLS-PER-FP ( -- U )
> =A0 =A0 =A0 =A0 DEPTH 0E DEPTH 1- >R FDROP R> SWAP - ;
> =A0 =A0 HEX
>
> when it fails to recognise the 0E in the third line. I presume this is
> meant to be recognised as floating point zero. But how is a system
> that has no floating point supposed to recognise that 0E is a floating
> point number? Even if it did then the FDROP wouldn't be recognised.
>
> Presumably this could be corrected by surrounding this bit of code
> with something like
>
> HAS-FLOATING [IF] =A0( DECIMAL etc )
> [ELSE] =A00
> [THEN]
>
> Gerry
Oops, I should also have noticed that there is an F@[EMAIL PROTECTED]
just below the
above, in the definition of FTESTER. So the conditional compilation
should also include thia word.
Gerry