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 > Forth 200X - ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3984 of 4050
Post > Topic >>

Forth 200X - problem with file ttester.fs

by Gerry <gerry@[EMAIL PROTECTED] > Apr 2, 2008 at 06:29 AM

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

    DECIMAL
    : COMPUTE-CELLS-PER-FP ( -- U )
        DEPTH 0E DEPTH 1- >R FDROP R> SWAP - ;
    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]  ( DECIMAL etc )
[ELSE]  0
[THEN]

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 Mon May 12 0:40:12 CDT 2008.