Sujet : Re: ANN: DX-Forth 4.57
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.os.cpm comp.lang.forthDate : 25. Dec 2024, 09:09:36
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <e5e1f8524522d6ce46bbbe3461a3ab654b335abc@i2pn2.org>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
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