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.

values - A list of values
array_ref - The name of the array to create in the calling frame.
Source code:
    upvar $array_ref array

    set i 1

    foreach element $values {
        set array($element$i
        incr i
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: