4 .HLL 'Tcl', 'tcl_group'
8 .param pmc argv :slurpy
12 if argc < 1 goto bad_args
14 .local pmc __list, __index
15 __list = get_root_global ['_tcl'], '__list'
16 __index = get_root_global ['_tcl'], '__index'
23 if argc == 1 goto done
28 if $I0 == argc goto done
38 indices = new 'FixedPMCArray'
45 elems = elements indices
48 if $I1 >= elems goto select_elem
52 index = __index($P0, list)
55 if index >= $I2 goto empty
56 if index < 0 goto empty
70 tcl_error 'wrong # args: should be "lindex list ?index...?"'
77 # vim: expandtab shiftwidth=4 ft=pir: