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

Re: [News] LOGO-L> Indirect Assignment



Frank Caggiano wrote:
> 
> Yehuda,
> 
> Lets say we have a bunch of boxes that we're going to store things in.
> In order to reference the boxes we give them names; "box1", "box2",
> "box3", etc.
> 
> So in box1 we put in a ball; in box2 a fire engine.  If I ask you to get
> what's in box1 you get the ball; I ask you to put this block into box2.
> These are DIRECT assignments. The object is placed directly into the
> container.
> 
> Now lets say I have you put a doll into box4 then I have you put box4
> (actually a slip of paper with "b" "o" "x" "4" writen on it) into box3.
> Now If you go to retrive the article in box3 what do you find? Not the
> article but a piece of paper telling you where it is. So then you go to
> box4 and get the doll. This is INDIRECT assignment and can go on for as
> many levels as you care to.
> 
> In logo terms this is:
> 
> make "box4 "doll
> make "box3 "box4
> show thing :box3        ; Note use of keyword 'thing'
> doll
> show :box3
> box4
> 
> To assign to box4 through box3 then:
> 
> make :box3 "dog         ; Note use of ':' before 'box3' rather than '"'
> show :box3
> box4
> show thing :box3
> dog
> 
> The keyword 'thing' says you do not want the contents of box3 but the
> contents of the container named by box3.
> 
> This can get very confusing. Just think of containers in a row with
> pointers from one to the next.  Follow the pointers until there are no
> more and that is were the actual value goes (or is).
> 
> There is a quote from "Alice Through the Looking Glass" that was just
> made for indirect assignments.
> -----
> "The name of the song is called 'Haddocks Eyes', said the knight.
> 
> "Oh, thats the name of the song, is it?" Alice said, trying to feel
> interested.
> 
> "No, you don't understand", the Knight said looking a little vexed.
> "Thats what the name is called. The name really is 'The Aged Aged Man.'"
> ---
> 
> It goes on for a few more levels of indirection. Its on p282 in my copy
> if you are interested.

Hello Frank,

Thank you very-very much for that explanation.

The example is very clear, and the Alice quotation is more that I could
expect.

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