goto ( label ) ;
list label A 'variable' label, defined elsewhere in the program as 'label :'
list label
%ARGUMENT : Invalid arguments. Usage: goto ( label ) ; %IDENTIFIER : 'variable' argument is not a valid identifier, literal, or reference
%ARGUMENT : Invalid arguments. Usage: goto ( label ) ;
%IDENTIFIER : 'variable' argument is not a valid identifier, literal, or reference
None
To execute the example below, press or modify the example to try different variations. int i = 0 ; label : if ( i == 0 ) { // First pass: // A label is actually a variable, defined as "" puts { "First pass, label = ",label }; } else if ( i == 1 ) { // Second pass, after using 'goto' puts { "Second pass, label = ",label } ; } else if ( i == 2 ) { // Third pass, exit puts { "Third pass, we exit" } ; exit ; } i++ ; // A label's value can be reassigned, it doesn't affect it as a label label = "whatever" ; goto label ;
label