Labels - IUrixl/Kova GitHub Wiki

Define

Definition of a label, it can be used as a function or a label.

Basic syntaxis

define <name> -> {
 <- <argument chain>
}

Arguments

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

Example of use

define sum -> {
	<- num1 num2

	var# result num1 + num2
}

Code pointer

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.

Basic syntaxis

.<name>

Arguments

Keyword Definition
Label Name of the label to jump

Example of use

.myPointer
print "Unsafe loop!"
point myPointer

Point

Jump to an unsafe label

Basic syntaxis

point <label>

Arguments

Keyword Definition
Label Name of the label to jump

Jump

Jump to a safe label

Basic syntaxis

jump <label>

Arguments

Keyword Definition
Label Name of the label to jump

Run

Run a safe label, transpilation of call.

Basic syntaxis

run <label> -> <argument chain>

Arguments

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

Example of use

kova
define main -> {
	run showOnScreen -> "Hello world"
	run showHiOnScreen
}

define showOnScreen -> {
	<- str

	print "%str%"
}

define showHiOnScreen -> {
	print "Hi"
}
⚠️ **GitHub.com Fallback** ⚠️