class
square {
varwidth:Int{
willSet{
println("width will set old=\(width) new=\(newValue)");
}
didSet{
("width did set new=width) old=oldValue)");
}
}
init(){
width=1;
}
}
vars:square=square();
s.width=2;
varwidth:Int{
willSet{
println("width will set old=\(width) new=\(newValue)");
}
didSet{
("width did set new=width) old=oldValue)");
}
}
init(){
width=1;
}
}
vars:square=square();
s.width=2;