I have a list eg MyList
set MyList [ list 508 1.648E-01 509 1.670E-01 510 1.701E-01 511 1.740E-01 512 1.784E-01 ]
How can I extract the Key / Value pair where: The absolute value of the values is max within the list ?? (What a sentence...)
In this case 512 1.784E-01
I would create a foreach loop and save the key value whenever the abs(Value) is greater than the previous pair. Is there a method without a loop? Im on tcl 8.5 so the "lsort -stride" trick is out of reach.