Scalar Variables

Variables are defined using a let statement. Let's define some scalar variables:

let n int = 42
let n2 = n

Variables are immutable. The variable n has the value 42 and cannot be changed. The variable n2 also has the value 42.

Delia can often infer the type if you haven't specified it. The following will infer a type of int.

let x = 101

Scalar variables are values in memory only. They do not interact with the database in any way.