you forgot to run the comment script on your last post, so im posting on this one:
if you think that's bad, you should spend a week @ 10+ hours a day trying to sort a list of up to 20 values in a stupid program that uses a stupid undocumented permutation of a stupid programming language.
7 Comments:
At 4:59 PM, andrew said…
you forgot to run the comment script on your last post, so im posting on this one:
if you think that's bad, you should spend a week @ 10+ hours a day trying to sort a list of up to 20 values in a stupid program that uses a stupid undocumented permutation of a stupid programming language.
At 6:14 PM, jacob said…
bubble sort?
At 1:30 PM, andrew said…
what do you mean?
example:
parameter -new TOF_time_1 7000 ns
pseudo TOF_time_1 {TOF_hit_1 TOF_hit_2} {if {$TOF_hit_1isValid && $TOF_hit_2isValid} {if { $TOF_hit_1 > $TOF_hit_2} {return [expr $TOF_hit_2]} else {return [expr $TOF_hit_1]}} else {return -150}}
... that works. nothing else does at this point.
At 11:05 PM, jacob said…
kill it with fire
seriously what language is that
At 7:48 PM, andrew said…
that's a program that uses a tcltk mod.
At 10:43 AM, andrew said…
p.s. this is working code:
pseudo tof_val $TOF_HIT_CPP { for {set i 1} {$i <= 20} {incr i} { if { [set TOF_hit_$i\isValid] && [set TOF_hit_$i] > -51} {set numval $i; set x [set TOF_hit_$i]; lappend big_t_list $x} else {set i 21}}; if {![info exists numval]} {set numval 0} else {global sorted_t_list; set sorted_t_list [lsort -real -increasing $big_t_list]; global index_list; if {[info exists index_list] == 1} {unset index_list}; set p 0; set k 0; set index_length [llength $sorted_t_list]; while { $k < $index_length } {if {[lindex $sorted_t_list $k] == [lindex $big_t_list $p]} {lappend index_list [expr $p + 1]; incr k; set p 0 } else {incr p}}}; return $numval}
At 7:30 PM, Anonymous said…
Does your mother know you two talk that way?
Seriously, this is your wonderful Aunt Connie.
If y'all are interested in adding to your collections, contact me.
beemabros@gmail.com
Post a Comment
<< Home