Data Types
All Data types of Pa.
Numbers
Integers, floats, hexadecimal and octal numbers.
130;
12.42;
0xff;
0o10;
Strings
Strings can be created using either double quotes or single quotes.
"What's up";
'Hey!';
Booleans
Booleans can be either true or false, Thanks George Boole.
true;
false;
Lists
Lists carry their own world, they can hold any datatype including themselves.
[1, "Wow", false, []];
Variables
Variables are your little companions, they are "named" values.
Creating variables is done by the let keyword, followed by a name and =
Then a value.
let number = 1;
let String = "variable";
let itsTrue = true;
let a_list = [1, 2.4, 0xff];
let danger = none;
A Variable can be accessed by its name in anytime as long as its defined
let number = 1;
number + 2; // 3
You can update a variable's value later like so:
let number = 1;
number = 2;
number + 2; // 4
Or you can update its type
let number = 1;
number = "Changed";
print(number); // Changed
You made it to the end of your first guide!