5 .param pmc argv :slurpy
9 if argc < 1 goto bad_args
11 .local pmc toList, getIndex
12 toList = get_root_global ['_tcl'], 'toList'
13 getIndex = get_root_global ['_tcl'], 'getIndex'
20 if argc == 1 goto done
25 if $I0 == argc goto done
35 indices = new 'FixedPMCArray'
42 elems = elements indices
45 if $I1 >= elems goto select_elem
49 index = getIndex($P0, list)
52 if index >= $I2 goto empty
53 if index < 0 goto empty
67 die 'wrong # args: should be "lindex list ?index...?"'
74 # vim: expandtab shiftwidth=4 ft=pir: