🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.logo
Article #7

Re: too many levels recursion- MSWlogo.2.1

#7
From: David Kressen
Date: Sun, 01 Nov 1992 22:30
18 lines
1115 bytes
As a LogoWriter user, and not having a WHILE primitive, I would have
tackled Bob's problem with a more obvious recursive procedure:

TO SPIRAL :FIRSTLENGTH :ANGLE
if :FIRSTLENGTH < 175 [stop]
fd :FIRSTLENGTH rt :ANGLE
SPIRAL :FIRSTLENGTH + 2 :ANGLE
END

I really appreciated Brian's discussion of how the interpreter treats
"tail recursion" (I now call this feature "iteration" to avoid confusion
with "real" recursion) and his definition of the procedure WHILE.

I'm not sure I really "approve" of Bob's use of "make" as the way of
updating :FIRSTLENGTH; the recursive call to SPIRAL seems a cleaner way to
accomplish the same thing.

Dave Kressen
Technical Details
Message-ID: <Bx26IL.9yJ@eis.calstate.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!olivea!charnel!rat!koko.csustan.edu!nic.csu.net!eis.CalState.EDU!dkresse
References: <19921031144805IZZYOB9@MVS.OAC.UCLA.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!olivea!charnel!rat!koko.csustan.edu!nic.csu.net!eis.CalState.EDU!dkresse
From: dkresse@eis.calstate.edu (David Kressen)
Newsgroups: comp.lang.logo
Subject: Re: too many levels recursion- MSWlogo.2.1
Message-ID: <Bx26IL.9yJ@eis.calstate.edu>
Date: 1 Nov 92 22:30:20 GMT
References: <19921031144805IZZYOB9@MVS.OAC.UCLA.EDU>
Organization: Calif State Univ/Electronic Information Services
Lines: 18