Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.cpm > #14398

Re: ANN: DX-Forth 4.57

From dxf <dxforth@gmail.com>
Newsgroups comp.os.cpm, comp.lang.forth
Subject Re: ANN: DX-Forth 4.57
Date 2024-12-25 19:09 +1100
Organization i2pn2 (i2pn.org)
Message-ID <e5e1f8524522d6ce46bbbe3461a3ab654b335abc@i2pn2.org> (permalink)
References <f3d930ef062d020cd12825545af27eb8cccf9160@i2pn2.org> <nnd$640eab7e$4e79ac20@662b3066f040a86b> <1813f2d19d4342f6$1$2114101$6edd246a@news.thundernews.com> <a8ce35a637d497e9463b59e0a60610f9193a0964@i2pn2.org> <18144fdcf3101ad4$48173$217357$28dd626e@news.thundernews.com>

Cross-posted to 2 groups.

Show all headers | View raw


On 25/12/2024 3:06 pm, John wrote:
> ...
> Also, I seem to have some trouble with the floating point.
> Keep getting f-stack error messages, which the manual says are under/over flows.
> 
> 
> 1 9 / <return>  returns a zero, not the expected 0.11111
> 
> So, I'm guessing the F* (etc.) are the floating point arithmetic.
> 3 5 F* <return>  however gives an "f-stack" error. 15 is an overflow?

Reals are entered with an 'e' thus:

3e 5e f* f. 15.  ok

The forth interpreter must be in DECIMAL for this to work.
 
> And not sure how to enter decimals, I though maybe entering a ".0" after my numbers would flag them as reals not integers, but...
> 3.14  2.96  <return> does not put both numbers on the stack

Those would be illegal numbers - neither reals nor integers.  Integers
take the form:

Singles:  1 -2 3
Doubles:  1. -2. 3.

Doubles have their own operators  D+ D* D. etc.  There are also mixed operators
e.g. UM* that takes two unsigned singles and leaves an unsigned double.

> 
> Maybe I'm not doing it right, I'm just doing what's intuitive to me.
> And yes, I'm running FORTH-F.  This is the DOS version.
> Please help a wayward user....

Since Forth is rather different it has had to develop its own conventions.
A bit of practice and it will become second nature!

HTH

Back to comp.os.cpm | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

ANN: DX-Forth 4.57 dxf <dxforth@gmail.com> - 2024-12-08 14:01 +1100
  Re: ANN: DX-Forth 4.57 Hans Bezemer <the.beez.speaks@gmail.com> - 2024-12-09 09:28 +0100
    Re: ANN: DX-Forth 4.57 John <john@somewhere> - 2024-12-23 17:41 -0600
      Re: ANN: DX-Forth 4.57 dxf <dxforth@gmail.com> - 2024-12-24 13:28 +1100
        Re: ANN: DX-Forth 4.57 John <john@somewhere> - 2024-12-24 22:06 -0600
          Re: ANN: DX-Forth 4.57 dxf <dxforth@gmail.com> - 2024-12-25 19:09 +1100
            FP number syntax (was: ANN: DX-Forth 4.57) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2024-12-25 11:36 +0000
          Re: ANN: DX-Forth 4.57 dxf <dxforth@gmail.com> - 2024-12-26 14:06 +1100

csiph-web