- or download this
Object subclass: 'Point' instanceVariables: 'x y '
...
init
x := Float new.
y := Float new.
- or download this
p := Point new.
p init.
p x: 1.5.
p y: 1.5.
- or download this
my $p = bless {}, Point;
$p->init;
$p->x(1.5);
$p->y(1.5);
- or download this
newX: xc Y: yc
p := Point new.
...
p x: xc.
p y: yc.
^p
- or download this
Point newX: 1.5 Y: 1.5.
- or download this
sub init
{
...
$object->init(@_);
return $object;
}