Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set orig {1 -4 6 0}
- set sorted [lsort -real $orig]
- set indices {}
- for {set i 0} {$i<[llength $orig]} {incr i} {
- lappend indices [lsearch -real $orig [lindex $sorted $i]]
- }
- puts "indices: '$indices'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement