Skip to content

Variables

DO-Ui edited this page Mar 14, 2022 · 2 revisions

Variables in Minlang can be either integers, booleans or strings and the code will automatically interpret the type of the variable.

You declare variables in the following syntax:

var_name=100; (Declaring integer)
var_name=true; (Declaring boolean)
var_name="string variable"; (Declaring string)

If you are declaring integers, you can add numbers together while declaring variables. The syntax looks like this:

var1=100+100; (Declares variable as 200)
var2=var1+50; (Declares variable as 250)
var3=var2/50; (Declares variable as 5)
var4=var3*10; (Declares variable as 50)
var5=var4-5; (Declares variable as 45)

Clone this wiki locally