Sujet : Re: Operator overloading?
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 31. Jul 2024, 17:14:53
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Jul31.181453@mips.complang.tuwien.ac.at>
References : 1 2 3 4
User-Agent : xrn 10.11
Gerry Jackson <
do-not-use@swldwa.uk> writes:
On 31/07/2024 08:47, albert@spenarnc.xs4all.nl wrote:
In article <v8b04c$137lg$1@dont-email.me>,
Stephen Pelc <stephen@vfxforth.com> wrote:
Here's a program that demonstrates a non-parsing TO:
>
VFX Forth 64 for Windows x64
© MicroProcessor Engineering Ltd, 1998-2023
>
Version: 5.43 [build 4238]
Build date: 9 November 2023
>
Free dictionary = 6731782 bytes [6574kb]
>
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
>
Using a flag means that x could be on another line or even in another file.
>
You could argue that it's not a standard program because it contains a
deliberate ambiguous condition
Exactly, it's not a standard program, and no particular behaviour is
specified in the standard for this program.
so a parsing TO would fail in some way
but it does demonstrate non-compliant behaviour.
Given that it's not a standard program and no particular behaviour is
prescribed, the behaviour of VFX is compliant for this program.
There may be some way to construct a compliant program using FIND,
SEARCH-WORDLIST, TRAVERSE-WORDLIST, or FIND-NAME, where VFX does not
behave compliantly, though.
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/ EuroForth 2024: https://euro.theforth.net