Example
Object ColorPoint isa Point;
var field color(p@ColorPoint);
method new_color_point(x0,y0,c0) {
object isa ColorPoint {
x := x0, y := y0, c := c0 }}
let p := new_color_point(3,4,”blue”);
print(p.color);
p.shift(2,-2);
print(p.x);
Previous slide
Next slide
Back to first slide
View graphic version