private

obj private $obj $key $val
sets value of private $key.
obj private $obj $key
returns value of private $key

Example:

% obj constructor morph {x0 y0 x1 y1 x2 y2 x3 y3} {
$self private start [new line -coords "$x0 $y0 $x1 $y1"]
$self private end [new line -coords "$x2 $y2 $x3 $y3"]
$self private line [new line]
}

ote:

nside methods, instead $self private, as syntactical sugar, you can use keyword my.

© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z