

class rectangle
===============

sys posx,posy
sys lenx,leny
sys color

method DataIn(sys px,py,lx,ly,rgba)
posx=px
posy=py
lenx=lx
leny=ly
color=rgba
end method

method Area() as sys
return lenx*leny
end method

method show() as string

return "Rectangle data:"  cr+
       "x pos  " tab posx cr+
       "y pos  " tab posy cr+
       "length " tab lenx cr+
       "height " tab leny cr+
       "color  " tab mid(hex(color,8),-8) cr+
       ""
end method

end class

'test
'====

rectangle rect

rect.dataIn 100,200,30,40,0x80a080c0

print rect.show() + " Area: " rect.area

