Create variables

This commit is contained in:
2025-10-24 20:32:51 +11:00
parent 176c07151a
commit 9ad3bdbc92
6 changed files with 139 additions and 118 deletions

View File

@@ -1,18 +1,11 @@
## Work in Progress
To create a comment, begin a line with a hash (#) symbol, like python.
So far, the supported types are `bool` and `string`.
Create a string: `string name value bytes`
## create name type bytes value
Create a boolean: `bool name value`
Creates the variable "var" with a set number of bytes allocated to it, and initialises its value.
**IMPORTANT:** The number of bytes cannot be modified later.
Create an integer: `int name value`
Example: `create var bool 1 true`
To set a variable to an input byte, use: `create var string 1 i[idx]`.
## print var
Prints the value of `var` to the console, where `var` is a variable.
Example: `print var`
**Note**: A string of dynamic length can be created by setting the bytes to -1.