Goto loops

From Scriptwiki
Revision as of 19:18, 30 October 2006 by Cail (talk | contribs) (cleaning wanted pages-list)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 testmsg {
  if ($1 == ahihi) { goto ahihi }
  elseif ($1 == kiaa) { goto kiaa }
  else { echo -ag try again! }

  :ahihi
  msg #channel ahihi
  halt

  :kiaa
  msg #channel kiaa
  halt
}