The expansion operator, {*}, makes each item in a list an individual argument of the current command. The function tcl::mathfunc::max does not process lists. The numbers should be passed as individual arguments. The expansion operator transforms a list of items into individual items.

Example:

set thicknesses {0.12 0.17 0.13 0.18 0.11 0.20}
puts $thicknesses
puts [tcl::mathfunc::max {*}$thicknesses]
puts [tcl::mathfunc::min {*}$thicknesses]

Result:

0.12 0.17 0.13 0.18 0.11 0.20
0.20
0.11

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading