Previous: , Up: preprocessor   [Contents][Index]


2.9 Manipulating arrays with macros

Preprocessor Macros: mbfl_slot_ref (VAR, KEY)

Expands into the expression:

${VAR[KEY]}

which evaluates to the value of the slot KEY in the array variable VAR. This macro works with both indexed and associative arrays.

Preprocessor Macros: mbfl_slot_set (VAR, KEY, EXPR)

Expands into the expression:

VAR[KEY]=EXPR

which stores the value of EXPR in the slot KEY of the array variable VAR. This macro works with both indexed and associative arrays.


Previous: , Up: preprocessor   [Contents][Index]

This document describes version 3.0.0-devel.0 of Marcos Bash Functions Library.