Sujet : Re: History of CREATE...DOES> ?
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 01. Aug 2024, 14:48:46
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Aug1.154846@mips.complang.tuwien.ac.at>
References : 1 2 3 4
User-Agent : xrn 10.11
dxf <
dxforth@gmail.com> writes:
On 26/07/2024 5:13 pm, Anton Ertl wrote:
...
But CREATE...DOES> also made it into Forth-79, so it must have been
more widespread by then.
>
Not necessarily. What systems had 'multiple WHILE' before ANS introduced
it?
cmForth
<
https://raw.githubusercontent.com/ForthHub/cmFORTH/combined/cmforth.fth>:
: WHILE ( a - a a) \ IF SWAP ;
: REPEAT ( a a) \ AGAIN \ THEN ;
where "\" is [COMPILE]. AFAIK the SWAP in the WHILE was relatively
late and while the SWAP was still in REPEAT, you had to implement
multiple-exit BEGIN loops differently, but up until fig-Forth (where
"compiler security" was a headline feature) such things were certainly
possible. It's interesting that "compiler security" discouraged such
usage, which made it easier to specify in Forth-94 that the CS-SwAP
happens in WHILE, not in REPEAT (because there was little existing
practice for such things at the time).
Brodie mentions it in 'Thinking FORTH' (1984) but without details or
endorsement by a Standard who would risk it?
Apparently not that many, or they had switched to the newer WHILE
already, otherwise standardizing it in Forth-94 would not have flown.
-- 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