github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/user-guide/reserved-vars.md (about) 1 # Reserved Variables 2 3 > Special variables reserved by Murex 4 5 In Murex, there are five different classes of variables: 6 1. Local variables (scope limited to a function et al) 7 2. Module variables (scoped to a module) 8 3. Global variables (available to every function within Murex but not shared 9 with processes outside of the Murex's runtime) 10 4. Environmental variables (available to every function and process -- internal 11 and external to Murex) 12 5. Reserved variables 13 14 Reserved variables are data that are available to any code running within 15 Murex and exposed as a variable. 16 17 Because reserved variables are dynamic properties of the runtime environment, 18 they can only be queried and not set: 19 20 ``` 21 ยป set SELF="foobar" 22 Error in `set` (0,1): cannot set a reserved variable: SELF 23 ``` 24 25 ## See Also 26 27 * [Modules and Packages](../user-guide/modules.md): 28 An introduction to Murex modules and packages 29 * [Numeric (str)](../variables/numeric.md): 30 Variables who's name is a positive integer, eg `0`, `1`, `2`, `3` and above 31 * [Pipeline](../user-guide/pipeline.md): 32 Overview of what a "pipeline" is 33 * [Variable and Config Scoping](../user-guide/scoping.md): 34 How scoping works within Murex 35 * [`ARGV` (json)](../variables/argv.md): 36 Array of the command name and parameters within a given scope 37 * [`COLUMNS` (int)](../variables/columns.md): 38 Character width of terminal 39 * [`HOSTNAME` (str)](../variables/hostname.md): 40 Hostname of the current machine 41 * [`MUREX_ARGV` (json)](../variables/murex_argv.md): 42 Array of the command name and parameters passed to the current shell 43 * [`SELF` (json)](../variables/self.md): 44 Meta information about the running scope. 45 * [`SHELL` (str)](../variables/shell.md): 46 Path of current shell 47 * [`export`](../commands/export.md): 48 Define an environmental variable and set it's value 49 * [`global`](../commands/global.md): 50 Define a global variable and set it's value 51 * [`set`](../commands/set.md): 52 Define a local variable and set it's value 53 54 <hr/> 55 56 This document was generated from [gen/user-guide/reserved_vars_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/user-guide/reserved_vars_doc.yaml).