I think Michael gave you good advice. However, you should be careful that
your students always end procedures with END on its own line. If a
procedure doesn't have an END, the subsequent procedures on the
procedures page won't be defined either. As a pedagogical device I always
write/type TO (leave a few carriage returns) and then END before filling
in the name and guts of a procedure. I remind kids that procedures always
begin with TO and end with END.
Another MicroWorlds feature you should know about is that the procedure:
to cafeteria
getpage "cafe
end
may be replaced with:
to cafeteria
cafe
end
Page names function like procedures and get that page when evoked.
The only time you need GETPAGE in MicroWorlds is when the page name is
input or passed from another procedure, for example:
to go
question [Which Prime Minister would you like to know about?]
getpage answer
end
or
to go
question [Which Prime Minister would you like to know about?]
carefully [getpage answer] [Announce [That page does not exist] go]
end
NOTE: If the procedure above does not end after the carefully line, then
insert the command STOP after GO in order to control the recursive
behavior of the procedure. Carefully is a great command (with 2 inputs)
that runs a list of instructions and if the result of those instructions
causes an error message, the second list of instructions is executed. In
other words, if you type the name of a page that doesn't exist, instead
of crashing the program, MicroWorlds will tell you again and then re-run
the procedure.
Hope this helps...
-=Gary
>Here's what I think may be happening:
>
>There's an error in one of your procedures somewhere midway down the
>procedures page. When you leave the procedures page, Logo reads through
>what you've written, top to bottom, and defines each procedure as it goes.
>If there's a certain type of error, Logo stops and doesn't get to the rest
>of the procedures.
>
>The kinds of errors that cause this are those that intefere with defining.
>Here's an example:
>
>to square
>repeat 4 [fd 50 rt 90]
>end
>
>to repeat
>end
>
>to circle
>repeat 36 [fd 10 rt 10]
>end
>
>This will cause the message "repeat is already used" - it's a primitive so
>you can't define it on your own. (Actually, you can, but that's another
>story.)
>
>In this case CIRCLE won't be defined and you'll get the message "I don't
>know how to circle" if you try to run it.
>
>I suspect that this is the problem you had. By moving procdures to the top
>of the procedures page you put them before the offending procedure.
---------------------------------------------------------------
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.