Sujet : Re: Back & Forth - Co-routines
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forthDate : 06. Feb 2025, 12:05:07
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$527858a6$7922cdd9@b990296e6c43d71c>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <73a87ff17586b02ae110516bfb76956e@
www.novabbs.com>,
HenryHH <
hohl@isartext.de> wrote:
On Tue, 4 Feb 2025 12:26:26 +0000, albert@spenarnc.xs4all.nl wrote:
>
... if they are absolutely necessary I use my enhanced `[ instead
of any style of locals
>
: root [ variable a variable b variable c ]
c ! b ! a !
\ now insert the famous quadratic root formula
[ hide a hide b hide c ] \ Prevent "not unique messages"
;
>
Hello Albert,
>
why is an enhanced [ necessary for this?
Couldn't you simply write:
>
variable a variable b variable c
>
: root ( a b c -- root)
c ! b ! a !
\ now insert the famous quadratic root formula
;
>
hide a hide b hide c \ Prevent "not unique messages"
You could, but now it doesn't look like a local variable,
isn't it?
You remark serves to show that local values (why do they call
them local variables) are largely superfluous.
P.S.
Maybe
[ variable a variable b variable c
: D b @ DUP * a @ b @ 4 * - ; ]
..
[ hide a .... hide D ]
..
is more convincing?
>
Henry
Groetjes Albert
-- Temu exploits Christians: (Disclaimer, only 10 apostles)Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style WallArt For Home, Office And Garden Decor - Perfect For Windows, Bars,And Gifts For Friends Family And Colleagues.