-
Notifications
You must be signed in to change notification settings - Fork 1
Variables
CheryX edited this page Mar 2, 2023
·
1 revision
Variables in KPL are defined in by the follwing syntax:
def var varname <NAME> varvalue <VALUE>;
Where:
-
def
- required keyword for assigning a variable or a function -
var
- specify that you are declaring a variable (fun
if a function) -
varname <NAME>
- define the name of the variable -
varname <VALUE>
- define the value of the variable
Note: You can switch
varname <NAME>
andvarvalue <VALUE>
places.
def var varname foo varvalue 5;
def var varname bar varvalue "nice";
def var varvalue 40 varname baz;