Updated Scripting: set & variables (markdown)

TurdPooCharger 2018-05-29 06:05:34 -04:00
parent d25fd2c62d
commit 1dac2376bc

@ -1,20 +1,45 @@
`set` command The `set` command defines or creates variables. Variables are fundamental to any programming.
## Usage ## Usage
### Syntax & Example ### Syntax & Example
`set <var> <arg>`
### User Defined Variables
### User Defined Variables
**Example 1**
`set VARIABLE "argument"`
`echo $[VARIABLE]`
**Output:**
> argument
In this example, the value of the variable called **VARIABLE** is _argument_. The value is re-definable.
`set VARIABLE "negotiate"`
`echo $[VARIABLE]`
**Output:**
> negotiate
Variables may hold empty or null placeholder values.
`set VARIABLE ""`
`echo $[VARIABLE]`
>
### Environmental Variables ### Environmental Variables
These are variables with values that cannot redefined. These are variables in which their values cannot redefined.
**Example:** **Example:**
`echo $[GM9OUT]` `echo $[GM9OUT]`
**Output:** 0:/gm9/out **Output:**
> 0:/gm9/out
`set GM9OUT "0:/gm9/in"` `set GM9OUT "0:/gm9/in"`
`echo $[GM9OUT]` `echo $[GM9OUT]`
**Output:** 0:/gm9/out **Output:**
> 0:/gm9/out
## Notes ## Notes