[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Tcl query!
set xys [abc]
On Mon, 24 Apr 2000, Ishan Mandrekar wrote:
> Hi all,
>
> I've a procedure which returns a value, defined as follows:
>
> proc abc {} {
> .....
> if {...} {
> return 1
> } else {
> return 0
> }
> }
>
> Now... proc abc is called inside another procedure xyz as follows:
>
> proc xyz {} {
> global abc
> .....
> set flag abc
> }
>
> I would like the variable flag to get the value returned by procedure abc,
> instead Tcl takes abc as a string and assigns it to flag.
>
> Hence if I do a puts $flag after the set statement, the value printed is
> "abc" and not 0 (or) 1.
>
> In such a case what is the correct way to initiate a procedure call?
>
> Thanks,
> Ishan.
>
>