User Tools

Site Tools


k10:k10.5:k10.5.6:start

10.5.6 On GoTo

The 'On GoTo' statement as a calculated jump exists in gambas since version 3.2.

10.5.6.1 'On GoTo' syntax

Jumps to one of the calculated labels. The evaluation of' Expression' must produce an integer value in order to select a (target) label.

On Expression GoTo Label_0 [ , Label_1 ... ]
…
Label_0:
  Instruction(s)
Label_1:
  Instruction(s)
…

10.5.6.2 Notes on the syntax

  • If the expression results in 0, then the first label is selected, if the expression has the value 1, then the second label is selected and so on … .
  • If the expression is negative or equal to or greater than the number of labels, then the 'On GoTo' instruction is tacitly ignored.

Download

Articles

Download

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.
k10/k10.5/k10.5.6/start.txt · Last modified: by 127.0.0.1