Sujet : Re: 0 SET-ORDER why?
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forthDate : 26. Jun 2024, 10:12:09
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$5929dbee$3536f029@3bc5a8541eb541f9>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <5c21b9a70973cda8da6fac285f5b2137@
www.novabbs.com>,
minforth <
minforth@gmx.net> wrote:
IMO, it is a simple security mechanism against other users
breaking out of an application program and taking control
of the shell.
I don't think so. The requirement to have FORTH-WORDLIST and SET-ORDER
means that you run the system normally after using this, including the
repl QUIT.
The intention of the standard that the minimum search order contains
a method to get the system under control. `FORTH' is way better than
manipulations with wordlists.
I cheated in ciforth. FORTH puts the FORTH-WORDLIST on top and is
a regular vocabulary/namespace.
In fact it is equivalent to
: FORTH GET-ORDER 1+ >R FORTH-WORDLIST R> SET-ORDER ;
So the ONLY namespace contains prefixes (handles numbers and strings)
and the word FORTH to recover.
FORTH and ONLY are named wordlist/ vocabularies.
To seal off in ciforth you can do:
'FORTH HIDDEN ONLY
From now on only numbers and strings are recognized.
Groetjes Albert
-- Don't praise the day before the evening. One swallow doesn't make spring.You must not say "hey" before you have crossed the bridge. Don't sell thehide of the bear until you shot it. Better one bird in the hand than ten inthe air. First gain is a cat purring. - the Wise from Antrim -