Mwnci Variables

Creating Variables

Mwnci doesn’t have a specific command for declaring variables.

A variable is created as soon as it has been assigned a value.

x = 10
y = "Vimes"
print(x)
print(y)

Also variables do not have to be declared as any particular type and can have the type changed after they have been set

x = 100          // integer
x = "Carrot"     // string
println(x)


Carrot

Casting

You can specify the type of a variable using casting

a = int(3)       // a will be 3
b = float(a)     // b will be 3.0 
c = string(a)    // c will be "3"