在.tcl中查找“ lsort”索引

时间:2019-04-29 17:26:57

标签: tcl

我们如何获得lsort的索引?

例如:

lsort -real {1 -4 6 0}

如何获取上面代码的索引,如idx =(1、3、0、2)?

1 个答案:

答案 0 :(得分:4)

-indices的{​​{1}}选项完全可以满足您的要求:

lsort

输出:

-4 is at 1
0 is at 3
1 is at 0
6 is at 2
相关问题