Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Question

Status
Not open for further replies.

brianwustl

Programmer
Feb 14, 2005
11
US
Hello,

I have a relatively simple question regarding tcl.

Basically, I only want some code to run if a value is over another value (which is set to some value minus 8).

It is giving me some problems, though:

Code:
set progressbartop 0
incr progressbartop [expr .movframe.bottom - 8]

if {$x < $progressbartop} {
    (code that works already)
}

There must be a way to do this...

Thanks,
Brian
 
If you want to set progressbartop to -8, you can simply type
set progressbartop -8

or use

set progressbartop 0
incr progressbartop -8

if {$x < $progressbartop} {
(code that works already)
}

Hope that helps you
cheers
lolo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top