Example
var field x(p@Point) := 0;
method x(p@Point) { fetch p.x and return}
method set_x(p@Point,new_value) { update p.x and return}
set_x(p,x(p)+1)
p.x := p.x + 1
Previous slide
Next slide
Back to first slide
View graphic version