Forth like interpreter
Tres Seaver
tseaver at starbase.neosoft.com
Mon Mar 20 21:00:27 EST 2000
In article <slrn8dd4ph.3t0.kc5tja at garnet.armored.net>,
Samuel A. Falvo II <kc5tja at garnet.armored.net> wrote:
>In article
><425A5D00B0F916D1.7920112131B1A88A.D3428C8A56515B00 at lp.airnews.net>, Tres
>Seaver wrote:
>
>>Forth was the first "brain-bender" language I learned, and the one which
>>caused me to learn assembler. I still credit Forth with making me Lisp-
>>impaired, via a kind of hysteresis.
>
>Odd. Forth is precisely what enabled me to learn Lisp. Forth is a reverse
>Lisp of sorts:
>
>(defun cmpint (x y)
> (cond ((< x y) -1)
> ((= x y) 0)
> (T 1)))
>
>: cmpint ( x y -- f )
> 2DUP < IF
> 2DROP -1
> ELSE
> = IF
> 0
> ELSE
> 1
> THEN
> THEN ;
Heh, perfect example -- I can figure out the Lisp by reading the Forth.
--
---------------------------------------------------------------
Tres Seaver tseaver at palladion.com 713-523-6582
Palladion Software http://www.palladion.com
More information about the Python-list
mailing list