NetGAtEcrew wrote:1. what different betwen return 0, return 1 and return ?
it allows you to manage the way your procedures works.
If a procedure call another one, the second MUST return a code, as 0 or 1, to know the achievement state. So, you can treat, in first procedure, using:
Code: Select all
if { [proc2 $argument] == 1] {
... treatment 'cuz it works ...
} else {
... it didn't work...
}
by default,
return is an exit of the current procedure.
NetGAtEcrew wrote:2. can give me some code with this algoritmh :
set a "Test"
if a != "Test" then halt or eror so tcl is not working from top proc to
bottom proc! i'm mean
Code: Select all
set a "Test"
if { $a != "Test"} {return 0}
... treatments if a == "Test"...