Sujet : Re: Operator overloading?
De : mhx (at) *nospam* iae.nl (mhx)
Groupes : comp.lang.forthDate : 31. Jul 2024, 10:41:23
Autres entêtes
Organisation : novaBBS
Message-ID : <2af79ef5abcec71a1d42a461b6bc56b8@www.novabbs.com>
References : 1 2 3 4
User-Agent : Rocksolid Light
On Wed, 31 Jul 2024 9:08:43 +0000, Gerry Jackson wrote:
[..]
111 value x x . 111 ok
222 to cr .( Does TO parse? ) x x 222 = [if] .( No it doesn't!) [then]
Does TO parse? No it doesn't! ok
[..]
As does iForth.
You could argue that it's not a standard program because it contains a
deliberate ambiguous condition so a parsing TO would fail in some way
but it does demonstrate non-compliant behaviour.
222 TO cr
should (I hope!) produce an exception (unless CR is redefined),
so this *definitely* fails and doesn't even finish the test.
I'm not sure that you can use a buggy program to test for an ambiguous
condition (looks like a top job for an eager lawyer). It would be
much better if the anomaly can be shown with a valid program. What's
the damage when a intentionally erroneous piece of code fails?
Also note that this program's output is correct on Vfx and fails with
an exception on compliant Forths :--)
-marcel