[Coco] Looping in Nitros9 Shell

Robert Gault robert.gault at att.net
Sat Jun 18 20:46:32 EDT 2016


Michael Furman wrote:
> I want to write a simple infinite loop to run a command in the Nitros9 Shell.  I tried RTFMing a bit and couldn't figure it out.  The ShellPlus documentation I could find seems to neglect mentioning the basics of what the shell can do and mostly describes features that never made it to the Nitros9 version.
>
> Sent from my Antique Model A1219 iPad
>

A script I use for looping contains:

*main
...
goto main

and also

*loop
...
goto loop

Either one of these can loop indefinitely or can have an exit if a condition is 
met. Just enclose the looping routine within a conditional, ex.:

if +%3<>00000
...
endif

The above quits when var.3=00000

Robert



More information about the Coco mailing list