Moved Instruction Documentation

This commit is contained in:
Netkas 2022-12-29 16:11:06 -05:00
parent 63d202bad2
commit ba0dc302ff
6 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,39 @@
# array_get
Get an item from an array using "dot" notation.
## Parameters
* array (`array`, `instruction`) - The array to get the value from.
* key (`string`, `instruction`) - The key to get the value for.
## Return
(mixed) - The value of the key or throws an exception if the key is not found.
## Exceptions
* `EvaluationException` - If there was an error while evaluating one or more parameters.
* `KeyException` - If the key is not found.
* `TypeException` - If one or more parameters are not of the expected type.
## Instruction Example
```json
{
"type": "array_get",
"_": {
"array": {
"foo": {
"bar": "baz"
}
},
"key": "foo.bar"
}
}
```
### Last Updated
Monday, December 26th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,35 @@
# divide
Divide two numbers.
## Parameters
* a (`integer`, `float`, `double`, `instruction`) - The number to divide.
* b (`integer`, `float`, `double`, `instruction`) - The number to divide by.
## Return
(`integer`, `float`, `double`) - The result of the division.
## 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.
* `ZeroDivisionException` - If the divisor is zero.
## Instruction Example
```json
{
"type": "divide",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
Monday, December 26th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,35 @@
# equals
Returns true if the two values are equal, false otherwise.
## Parameters
* a (`integer`, `float`, `double`, `string`, `boolean`, `instruction`) - The first value to compare.
* b (`integer`, `float`, `double`, `string`, `boolean`, `instruction`) - The second value to compare.
## Return
(`boolean`) - True if the two values are equal, false otherwise.
## 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.
## Instruction Example
```json
{
"type": "equals",
"_": {
"a": "foo",
"b": "foo"
}
}
```
### Last Updated
Monday, December 29th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

34
docs/instructions/get.md Normal file
View 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)

View file

@ -0,0 +1,34 @@
# greater_than
Returns true if the first argument is greater than the second argument.
## Parameters
* a (`integer`, `float`, `double`, `instruction`) - The first number.
* b (`integer`, `float`, `double`, `instruction`) - The second number.
## Return
(`boolean`) - True if the first argument is greater than the second argument.
## 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.
## Instruction Example
```json
{
"type": "greater_than",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
Monday, December 29th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)

View file

@ -0,0 +1,34 @@
# greater_than_or_equals
Returns true if the first argument is greater than or equal to the second argument.
## Parameters
* a (`integer`, `float`, `double`, `instruction`) - The first number.
* b (`integer`, `float`, `double`, `instruction`) - The second number.
## Return
(`boolean`) - True if the first argument is greater than or equal to the second argument.
## 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.
## Instruction Example
```json
{
"type": "greater_than_or_equals",
"_": {
"a": 10,
"b": 2
}
}
```
### Last Updated
Monday, December 29th, 2022.
Written by [Netkas](https://git.n64.cc/netkas)