You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

409 B

Variables

If you are familiar with some other programming language, the way Sabre handles variables won't surprise you.

To declare a variable, the let keyword is used. The type of the variable is infered, but can be specified explicitly.

// variables.sb
fn main() {
    let x = 10
    let y: int = 5
    println(x + y)
}

Run this code using the sabre CLI:

$ sabre run variables.sb
15