How could i pass some variables/ arrays outside of procedure?
Lets say I've my procedure 'myproc' with inputparameters {a b c d e}, e.g.
myproc {a b c d e} {
... do something
(calculate arrays, lists and new variables)
}
Inside this procedure I want to calculate an array phiN(1),phiN(2),...phiN(18) out of the variables a-e which itself is a list, e.g.
set phiN(1) [list 1 2 3 4 5 6 7 8 9];
(lets say the values 1-9 had been calculated out of the input variables a-e). And I want to calculate some other parameter alpha and beta
set alpha [expr a+b];
set beta [expr c+d];
Anyway no I want to pass these new calculated variables outside of my procedure. Compare to matlab I simply would write sg like to get these variables outside of the 'function'.
[phiN,alpha,beta] = myproc{a b c d e}
Has anybody an idea how I can deal in tcl?? Thanks!