[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> Hello and Syntax question



I apologize for sending a message to a list before I have followed the list
for a reasonable period. I have reviewed the archive at gsn.org. and gotten
useful pointers to the articles at the Logo Foundation site.

 I also apologize that I am not a teacher, but rather a father with a son who
really wants to be able to construct interactive games. He got exposed to
HyperStudio which has the option of triggering Logo scripted events from its
objects. He is in a four week all-day Saturday scripting class. I would like
to be able to make Logo programming coherent.....he asks a lot of "whys".

My question arises from the difference between Logo and my experience with
several other procedural computer languages and applications. What is the
basis for the difference in variable passing in the following code taken from
an article on event-driven programming by Michael Tempel:

to setenergy :how.much
make "energy :how.much
end

to energy
output :energy
end

to more.energy
setenergy energy + 1
end

Energy is dealt with in three different "forms": 1) a naked form used in the
third procedure, 2) an "coloned" form used in both the parameter list of the
procedural definition of 'setenergy' and the passing of energy to OUTPUT , and
3) a quoted form used as the first argument to MAKE. What is the rule that
determines the acceptable packaging of variable? I can accept that there
should be the quoted form for naming, but why should there be two different
forms for passing variables that will clearly need to be evaluated?

I don't want to leave the impression that I just went out and bought this
package and immediately sent this message. I have been interested in AI for
decades, have tried to learn LISP and LOGO in prior incarnations on Z80/CPM
and earlier Mac versions. The manuals and additional books I have purchased
and read have not really explained this difference. The error massages are
opaque in the extreme. Can anyone shed some light? (Why don't the error
messages have some kind of explanation that say what is really going on?)

Thanks, David Winsemius, MD
dwinsemius@home.com
using Mac 6100/60, 40Meg, system 7.6, HyperStudio v 3.1
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home