Labels - IUrixl/Kova GitHub Wiki
Definition of a label, it can be used as a function or a label.
define <name> -> {
<- <argument chain>
}
Keyword | Definition |
---|---|
Name | Name of the label to create |
<- | Must be inside the brackets, mandatory to retreive arguments from a run |
Argument Chain | Name of the variables retrieved from the run |
define sum -> {
<- num1 num2
var# result num1 + num2
}
Code pointers are unsafe labels within safe labels that can only be called using point.
NOTE: Pointers are not safe and using the point method will only allow u to jump to unsafe labels. Jump and run are only intended to be executed on safe labels, those that are defined and not inside other label's structures.
.<name>
Keyword | Definition |
---|---|
Label | Name of the label to jump |
.myPointer
print "Unsafe loop!"
point myPointer
Jump to an unsafe label
point <label>
Keyword | Definition |
---|---|
Label | Name of the label to jump |
Jump to a safe label
jump <label>
Keyword | Definition |
---|---|
Label | Name of the label to jump |
Run a safe label, transpilation of call.
run <label> -> <argument chain>
Keyword | Definition |
---|---|
Label | Name of the label to call |
-> | Derivation sign, only mandatory when passing arguments |
Argument Chain | Bunch of arguments, can be variables or quoteds and need to be spaced |
kova
define main -> {
run showOnScreen -> "Hello world"
run showHiOnScreen
}
define showOnScreen -> {
<- str
print "%str%"
}
define showHiOnScreen -> {
print "Hi"
}