Sujet : Re: Avoid treating the stack as an array [Re: "Back & Forth" is back!]
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forthDate : 15. Sep 2024, 10:20:17
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$6647ff82$65c7531e@5d021b7c2adb2f81>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <e29088cacf765cd0da6519e333fa78f1@
www.novabbs.com>,
Ahmed <
melahi_ahmed@yahoo.fr> wrote:
Hi,
In fuzzy logic, a triangular membership function mf(x;a,b,c) is defined
as:
>
mf(x;a,b,c) = (x-a)/(b-a) for a <= x < b,
(c-x)/(c-b) for b <= x < c,
0e elsewere.
>
defining it with locals:
>
: tri_mf() { f: x f: a f: b f: c } ( f: x a b c -- mv)
x a f>= x b f< and if x a f- b a f- f/ exit then
x b f>= x c f< and if c x f- c b f- f/ exit then
0e
;
>
But defining it without locals ????!!!!!
>
: tri_mf() ( f: x a b c -- mv) ....
>
How?
locals doesn't help here. flocals maybe, but that
is the whole point. You are halfway through the rabbit hole
if you demand flocals dlocals ..
>
Ahmed
-- 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.