Goto loops

From Scriptwiki
Revision as of 01:30, 31 October 2006 by Vliedel (talk | contribs) (heh [ ] -> [[ ]])

Jump to: navigation, search

You can use goto command to jump from one point to another in a script.
Goto's aren't used very much.

alias channels {
  var %i , %chans 
  :nexti
  inc %i
  if (%i > $chan(0)) { return %chans }
  var %chans = %chans $chan(%i)
  goto nexti
}