Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Forth 200X ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3984 of 4065
Post > Topic >>

Re: Forth 200X - problem with file ttester.fs

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




 2 Posts in Topic:
Forth 200X - problem with file ttester.fs
Gerry <gerry@[EMAIL PR  2008-04-02 06:29:17 
Re: Forth 200X - problem with file ttester.fs
Gerry <gerry@[EMAIL PR  2008-04-02 12:29:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 7:29:53 CDT 2008.