Input and equal commands
This commit is contained in:
@@ -19,16 +19,26 @@ Changes the value of an already created value.
|
||||
|
||||
Example: `set var = "World"`
|
||||
|
||||
## input var *bytes = type *ibytes
|
||||
|
||||
Creates a new variable that is `bytes` long, that reads the first `ibytes` of input.
|
||||
|
||||
Example: `input str *5 = string *3` (3 bytes of input, remaining 2 bytes are left blank)
|
||||
|
||||
## if bool
|
||||
|
||||
Runs code if a boolean is true.
|
||||
|
||||
Example:
|
||||
```
|
||||
create bool *1 = false
|
||||
create var *5 = "Hello"
|
||||
# If a boolean is true
|
||||
if bool {
|
||||
set var = "BASM!"
|
||||
set str = "Hello"
|
||||
}
|
||||
|
||||
# If second byte of var and third byte of var are equal
|
||||
if var[1] == var[2] {
|
||||
set bool = true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user