Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

RE: [lpc2000] Re: Free Forth for LPC2xxx

2006-03-28 by Paul Curtis

Hi, 


> Is floating point actually included?  The example in section 
> 13.7 of the manual comes back as undefined:
> 
> 1.234 FCONSTANT CON1 is undefined
> 1.234 FCONSTANT CON1
>      ^
> 
> Direct evaluation of integers works:
> 1 2 + . 3  ok
> 
> No so with floating point:
> 1.1 2.2 + . is undefined
> 1.1 2.2 + .
>    ^
> 
> But, then, I have been working with Forth for about 5 minutes...

I think 1.1 is a double constant (2 cells on the stack) and would be
added with D+ (IIRC).

To add floats I believe you need F+ and to print them F.

Regards,

-- Paul.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.