Hi,
I'm trying to get a boolean value from a procedure, so I can use it for an if-loop:
proc program {
$ns at $now getbool //ns runs the proc @ a certain time
if {$bool == 1} {
do something...
} else {
do something else...
}
}
proc getbool {
set bool 0
set req [expr $x - $y]
if {$req == 0} {
set bool 1
return $bool
} else {
do something....
}
}
Anyone who knows how to do this?
thx
I'm trying to get a boolean value from a procedure, so I can use it for an if-loop:
proc program {
$ns at $now getbool //ns runs the proc @ a certain time
if {$bool == 1} {
do something...
} else {
do something else...
}
}
proc getbool {
set bool 0
set req [expr $x - $y]
if {$req == 0} {
set bool 1
return $bool
} else {
do something....
}
}
Anyone who knows how to do this?
thx