Goto loops: Difference between revisions
Jump to navigation
Jump to search
m cleaning wanted pages-list |
m changed example to a loop.. |
||
Line 2: | Line 2: | ||
Goto's aren't used very much. | Goto's aren't used very much. | ||
alias | alias channels { | ||
if ($ | [var] %i , %chans | ||
:nexti | |||
[inc] %i | |||
[if] (%i > [$chan](0)) { [return] %chans } | |||
var %chans = %chans $chan(%i) | |||
[goto] nexti | |||
} | } |
Revision as of 23:29, 30 October 2006
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 }