RUN :PLAY does not work.
I put in PRINT :PLAY and it prints POWER_RIGHT as expected, but when
it gets to RUN :PLAY it tells me that run requires a list as its first
input. When I put a [] around :PLAY then I get a message:
You don't say what to do with the output of PLAY"
Here's something to try:
First, Bill Glass reminds us that PLAY is a primitive, so use another name,
perhaps PLAY.IT.
Now you need to have a list for RUN, so the contents of PLAY.IT need to be
enclosed within brackets. To bring that about PLAY.IT must initially be an
empty list, so MAKE "PLAY.IT [].
Then put POWER, SLOT into the list with FPUT. _LEFT and _RIGHT are then
brought in by joining them to the contents of PLAY.IT with WORD and FIRST.
So,
to action
make "play.it []
if equal? :CH_FORM 1 [make "play.it fput "POWER :play.it] else [make
"play.it fput "SLOT :play.it]
if equal? :CH_SIDE "L [make "play.it word first:play.it "_LEFT] else [make
"play.it word first :play.it "_RIGHT]
run :play.it
end
John Hayes
---------------------------------------------------------------
Please post messages to the Logo forum to log...@gsn.org. Mail
questions about the list administration to log...@gsn.org. To
unsubscribe send unsubscribe logo-l to majo...@gsn.org.