Files
BrainAssembly/syntax.md

28 lines
534 B
Markdown
Raw Normal View History

2025-10-24 20:32:51 +11:00
## Work in Progress
2025-10-06 10:50:14 +11:00
2025-10-24 20:32:51 +11:00
To create a comment, begin a line with a hash (#) symbol, like python.
2025-10-06 12:52:38 +11:00
2025-10-24 20:32:51 +11:00
Create a string: `string name value bytes`
2025-10-20 10:38:15 +11:00
2025-10-24 20:32:51 +11:00
Create a boolean: `bool name value`
2025-10-06 12:52:38 +11:00
2025-10-24 20:32:51 +11:00
Create an integer: `int name value`
2025-10-28 14:48:11 +11:00
**Note**: A string of dynamic length can be created by setting the bytes to -1.
Print a string: `print name`
2025-10-30 17:15:43 +11:00
Increment an int: `inc name`
2025-11-01 10:30:03 +11:00
If statement:
```py
if bool
# Code here
end if
```
2025-10-28 14:48:11 +11:00
Example program (prints "Hello, World"):
2025-10-30 17:15:43 +11:00
```py
string var 13 "Hello, world!" # Or -1 bytes for a dynamic string
2025-10-28 14:48:11 +11:00
print var
```