Refactored GetVariable, added documentation
This commit is contained in:
parent
0cbb927066
commit
876621f618
2 changed files with 64 additions and 22 deletions
34
docs/get.md
Normal file
34
docs/get.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# get
|
||||
|
||||
Gets an existing variable from the environment.
|
||||
|
||||
## Parameters
|
||||
|
||||
* name (`string`, `instruction`) - The name of the variable to get.
|
||||
|
||||
## Return
|
||||
|
||||
(`any`) - The value of the variable.
|
||||
|
||||
## Exceptions
|
||||
|
||||
* `EvaluationException` - If there was an error while evaluating one or more parameters.
|
||||
* `TypeException` - If one or more parameters are not of the expected type.
|
||||
* `NameException` - If the variable does not exist.
|
||||
|
||||
|
||||
## Instruction Example
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "get",
|
||||
"_": {
|
||||
"name": "foo"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Last Updated
|
||||
|
||||
Monday, December 29th, 2022.
|
||||
Written by [Netkas](https://git.n64.cc/netkas)
|
Loading…
Add table
Add a link
Reference in a new issue