mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Updated Scripting: set & variables (markdown)
parent
d25fd2c62d
commit
1dac2376bc
@ -1,20 +1,45 @@
|
||||
`set` command
|
||||
The `set` command defines or creates variables. Variables are fundamental to any programming.
|
||||
|
||||
## Usage
|
||||
|
||||
### Syntax & Example
|
||||
`set <var> <arg>`
|
||||
|
||||
|
||||
### 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
|
||||
These are variables with values that cannot redefined.
|
||||
These are variables in which their values cannot redefined.
|
||||
|
||||
**Example:**
|
||||
`echo $[GM9OUT]`
|
||||
**Output:** 0:/gm9/out
|
||||
**Output:**
|
||||
> 0:/gm9/out
|
||||
|
||||
`set GM9OUT "0:/gm9/in"`
|
||||
`echo $[GM9OUT]`
|
||||
**Output:** 0:/gm9/out
|
||||
**Output:**
|
||||
> 0:/gm9/out
|
||||
|
||||
## Notes
|
Loading…
x
Reference in New Issue
Block a user