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

LOGO-L> Primitive or Library Procedure?



George,

You asked me why I insisit that the information about the position of
any turtle (when I use more than one turtle) MUST be a primitive and not
a library procedure. Here's my reasoning:

*       I'm located at, say, turtle 1, and I want to know the location
of
turtle n (n>1). The lib. procedure you suggested sends me to turtle n,
I ask him his position, and then I return to the turtle 1. This is
clumsy
and not real Logo.

*       According to your suggestion, another lib. procedure is needed
to find
the direction (TOWARDS) to turtle n, and another lib. procedure to find
the distance (DIST) to turtle n, and another... well, the disadvantages
are clear, I hope.

On the other hand:
Logo "knows" the location of each turtle at any given moment. So it must
be ready to supply that information right away on demand. This can be
done only if TURTLE (or some similar name) is a primitive.

Given such a TURTLE function I can use it DIRECTLY (without any lib.
procedure) to know the position of turtle n, the direction from my
location to it, my distance from it, and maybe more.

Incidently, another primitive-function that's missing in UCBLogo and
MSWLogo in my opinion is DOTCOL that reports the color of a given
location. Such a function can widen the repertoir of Logo's turtle
geometry considerably. I talked about it once or twice with Brian, but
he apparently didn't find it to be of importance.

Regards...

[[Yehuda]]

---------------------------------------------------------------
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