The easy way is, you associate the contents of the listbox with the actual commands to execute, by using an associative array. In your case:
---------------------------------------------------
# first in a pair: listbox contents
# second: actual script command
array set commands {...
The reason is 4294967296 is too large to be represented as a 32-bit integer. If you really need make calculations with large numbers, you may get the Mpexpr package (multiple precision arithmetic), installed in your system, then do
package require Mpexpr
set 32mod_val [mpexpr 256%4294967296]...
If you are running from a tcl console (e.g. tkcon), this
is true, because it have captured your "stdin".
In general, you can have the input channel blocking, buffering, &c, controlled by the command fconfigure. This "-1" means the channel stdin is not blocking and have no...
I see no problem with it. Suppose the measured value is stored in $value. You can create an event for each 60 seconds to store what you want:<br>
<br>
proc measure {} {<br>
global results_array value<br>
set time [clock format [clock seconds] -format "%H:%M"]<br>
set...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.