Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.21 KB

1.0.1.md

File metadata and controls

35 lines (30 loc) · 1.21 KB

OAT v1.0.1 Documentation

Variables

dec var_name var_value - auto declares a variable
strdec - declares a string, a must for concatenation
intdec - declares an integer
chardec - declares a char
floatdec - declares a float
doubledec - declares a double
booldec - declares a boolean
mov a b - copies the value of a into b

Math

cat a b - adds two strings together. converts b into a string
add a b - adds a and b and stores it in a
sub a b - subtracts b from a and stores it in a
mul a b - multiplies a and b and stores it in a
div a b - divides a and b and stores it in a
mod a b - gets the modulus of a and b and stores it in a

Input/Output

io out a - prints out a to the console
io nlout a - prints out a to the console with a newline
io in name - declares name as a string, then gets the input and stores it in name

Special Characters

Predefined variables

NEWLINE - \n - The newline character
SPACE - “ “ - a space
TRUE - true
FALSE - false

Comments

Comments start with a semicolon: “;”. Anything after the “;” will be ignored.

Example Programs