[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] What's mean "eval" in Otcl ?



On Wed, 21 Jul 1999, HoKun Chung wrote:

> I am afread of annoying you.. but, i hava some question.
> 
> I am beginner of Otcl , ns. 
> 
> I don't know the meaning of  "eval", "next"  in Otcl. 

eval is used much as it is in Tcl, so shouldn't need explanation
since the OTcl docs assume you're familiar with Tcl. See Osterhout's
book.

next seems to have sprung fullyformed out of nowhere for OTcl,
and therefore ought to be documented in the OTcl documentation...

..which it is. about halfway down:
ftp://ftp.tns.lcs.mit.edu/pub/otcl/doc/object.html

L.

> here is sample code..
> 
> ---------------------------------------------
> % SpreadableBagel instproc init {args} {
>          $self set toppings {}
>          eval $self next $args
>     }
> % SpreadableBagel instproc spread {args} {
>          $self instvar toppings
>          set toppings [concat $toppings $args]
>          return $toppings
>    }
> 
> sorry if i annoy you....

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>