ID:179073
 
How do I make it so when somebody presses a verb it repeats the code over and over?
Look up the goto and while procs.
In response to WizDragon
Or, better yet look up the for() loop proc.
In response to WizDragon
WizDragon wrote:
Look up the goto and while procs.

Yuck! "goto" is one ugly, ugly way to code.
In response to Skysaw
Skysaw wrote:
Yuck! "goto" is one ugly, ugly way to code.

Actually I find a certain forgotten elegance to it, though obviously when while() or for() are available and work at least as well, they should be used instead.

Still there are a few times in programming where I've thought goto would be appropriate. C brought us some wonderful replacements for the once-overused command, but it failed to deliver in a few of the more obscure places.

Actually there's a fun irony in this thread, that no one yet has suggested the correct way to handle this problem, with spawn() and a var to know when to stop. If an infinite loop is put right within the verb, I think bad things would result.

Lummox JR
In response to Skysaw
Yes, and I replaced most of the goto procs in my code with while procs, but for some procs, I need goto in there for it to work. I really don't know why, it may have just been the timing, but it works.
In response to WizDragon
WizDragon wrote:
Yes, and I replaced most of the goto procs in my code with while procs, but for some procs, I need goto in there for it to work. I really don't know why, it may have just been the timing, but it works.

Don't mind me, I'm just being snobby. If goto is working for you, keep it in there!