Goto

From Game Editor

Revision as of 18:44, 25 November 2009 by Asmodeus (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Use the keyword goto to move to a certain point in the script. Here is an example:

mylabel:
if(x > 0)
{
  x -= 1;
  goto mylabel;
}

You can give the labels a name, but each label must have a unique name.

Although the C compiler supplies the goto keyword, its use isn't recomendable due to produce confuse codes.

Retrieved from "http://game-editor.com/Goto"