template::util::list_to_lookup (public)
template::util::list_to_lookup values array_ref
Defined in packages/acs-templating/tcl/util-procs.tcl
Turn a list into an array where each key corresponds to an element of the list... Sort of like a sparse bitmap. Each value corresponds to the key's position in the input list.
- Parameters:
- values (required)
- A list of values
- array_ref (required)
- The name of the array to create in the calling frame.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- util_list_to_lookup
Source code: upvar $array_ref array set i 1 foreach element $values { set array($element) $i incr i }XQL Not present: Generic, PostgreSQL, Oracle