Files
BrainAssembly/syntax.md
2025-11-03 13:50:32 +11:00

30 lines
622 B
Markdown

## Work in Progress
To create a comment, begin a line with a hash (#) symbol, like python.
Create a string: `string name value bytes`
Create a boolean: `bool name value`
Create an integer: `int name value`
**Note**: A string of dynamic length can be created by setting the bytes to -1.
Print a string: `print name`
Increment an int: `inc name`
Check if two numbers are equal, and store the result in `cond`: `equal num1 num2 cond`
If statement:
```py
if bool
# Code here
end if
```
Example program (prints "Hello, World"):
```py
string var 13 "Hello, world!" # Or -1 bytes for a dynamic string
print var
```