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

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k10/k10.5/k10.5.6/start.txt · Last modified: 23.09.2023 by honsek

Page Tools