github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/variables/numeric.md (about) 1 # Numeric (str) 2 3 > Variables who's name is a positive integer, eg `0`, `1`, `2`, `3` and above 4 5 ## Description 6 7 Variables named `0` and above are the equivalent index value of `@ARGV`. 8 9 These are reserved variable so they cannot be changed. 10 11 12 13 ## Examples 14 15 ``` 16 » function example { out $0 $2 } 17 » example 1 2 3 18 example 2 19 ``` 20 21 ## Detail 22 23 ### `0` (str) 24 25 This returns the name of the executable (like `$ARGS[0]`) 26 27 ### `1`, `2`, `3`... (str) 28 29 This returns parameter _n_ (like `$ARGS[n]`). If there is no parameter _n_ 30 then the variable will not be set thus the upper limit variable is determined 31 by how many parameters are set. For example if you have 19 parameters passed 32 then variables `$1` through to `$19` (inclusive) will all be set. 33 34 ## See Also 35 36 * [`ARGV` (json)](../variables/argv.md): 37 Array of the command name and parameters within a given scope 38 * [`PARAMS` (json)](../variables/params.md): 39 Array of the parameters within a given scope 40 * [`autocomplete`](../commands/autocomplete.md): 41 Set definitions for tab-completion in the command line 42 * [`function`](../commands/function.md): 43 Define a function block 44 * [`out`](../commands/out.md): 45 Print a string to the STDOUT with a trailing new line character 46 * [`private`](../commands/private.md): 47 Define a private function block 48 * [`set`](../commands/set.md): 49 Define a local variable and set it's value 50 * [`string` (stringing)](../types/str.md): 51 string (primitive) 52 53 <hr/> 54 55 This document was generated from [gen/variables/numeric_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/variables/numeric_doc.yaml).