Overview

Variables

Tutorial for variables.

Tutorial

What's a variable

Variables are a way to dynamically use information, let's take our previous example and say we want to output a variable.

printl(foo);

foo

is not a string, it's a variable, but if we run this code we will get an error, this is because we haven't set the variable to a reference yet.

Declaring a variable

We use

:=

to declare a new variable, here we set the variable foo from the previous example to the string

"bar"

.

foo := "bar";

Re-assigning a variable

After a variable has been declared we use the token

=

to re-assign it, using

:=

again would reset the declaration.

foo = "Hello, World!";

There isn't a typing system

Types are automatically assigned based on context, this brings us to our next lesson which will tell you about types.