7: Variables [✓] - royal-lang/rl GitHub Wiki

Variables are declared using the var keyword.

The type for a variable is optional as long as a right-hand expression or value is given that the type can be interfered from.

VAR TYPE NAME;
VAR TYPE NAME = EXPRESSION/VALUE;
VAR NAME = EXPRESSION/VALUE;

Example:

var string:const message = "Hello World!";

var value = getValue();

var integer = 100;