[
(index)Outputs an element from an array, map or table
Outputs an element or multiple elements from an array, map or table.
Please note that indexes in murex are counted from zero.
<stdin> -> [ element ] -> <stdout>
$variable[ element ] -> <stdout>
<stdin> -> ![ element ] -> <stdout>
Return the 2nd (1), 4th (3) and 6th (5) element in an array
» ja [0..9] -> [ 1 3 5 ]
[
"1",
"3",
"5"
]
Return the data-type and description of config shell syntax-highlighting
» config -> [[ /shell/syntax-highlighting ]] -> [ Data-Type Description ]
[
"bool",
"Syntax highlighting of murex code when in the interactive shell"
]
Return all elements except for 1 (2nd), 3 (4th) and 5 (6th)
» a: [0..9]-> ![ 1 3 5 ]
0
2
4
6
7
8
9
Return all elements except for the data-type and description
» config -> [[ /shell/syntax-highlighting ]] -> ![ Data-Type Description ]
{
"Default": true,
"Dynamic": false,
"Global": true,
"Value": true
}
Indexes in murex behave like any other computer array in that all arrays start from zero (0
).
As demonstrated in the examples above, [
specifies elements to include where as ![
specifies elements to exclude.
By default, index generates an error if an element doesn't exist. However you can disable this behavior in config
» config -> [ foobar ]
Error in `[` ((builtin) 2,11): Key 'foobar' not found
» config set index silent true
» config -> [ foobar ]
[
![
@[
(range): Outputs a ranged subset of data from STDIN[[
(element): Outputs an element from a nested structurea
(mkarray): A sophisticated yet simple way to build an array or listconfig
: Query or define murex runtime settingscount
: Count items in a map, list or arrayja
(mkarray): A sophisticated yet simply way to build a JSON arraymtac
: Reverse the order of an arrayThis site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Thu May 26 22:49:43 UTC 2022 against commit 59e27bb59e27bb1013043fc4a940cf9a2767c63f31dad2c.
Current version is 2.8.2100 which has been verified against 15889 tests cases.