Reach a label (Code jump)

Command :


Aperçu visuel :

Functionality :

This command allow to "do a jump" to an specific CpcdosC+ code zone on .CPC file.

WARNING:It's not recommended to use this command for jump in another function, for exit loop or IF/ context. This is no-safe, and can cause stack program corruption and crash system.

Not recommended examples :

if/ "value" == "value" then:
    goto/ ok
    goto/ no_ok
end/ si

Function/ toto()
    goto/ other_function
End/ Function

Function/ other()
End/ Function

Avaiable parameters :

  • Label name in the same file.

    [Location name]

Examples :

Example 1

Display 2 line to the screen by jumping the 2nd

txt/ My first line
goto/ Sauter
txt/ My second line
txt/ My 3nd line

Display on console :

My first line
My 3nd line

Example 2

Display 5 lines in loop

// We begin to zero
set/ value = 0


// We add +1 to the "value" variable
set/ value = /C(%value% + 1)

txt/ I'm at %value% nd value!

// If value is strictly at "5", then we jump to "end" label
if/ "%value%" == "5" then: goto/ end

// Else, we loop at "begin"
goto/ begin

txt/ Ending.

Display on the console

I'm at 1 nd value!
I'm at 2 nd value!
I'm at 3 nd value!
I'm at 4 nd value!
I'm at 5 nd value!