Oxygen Basic
Variable Types
Systen Integer
sys a=42.4
print a
Floating Point
single a=1234.5 'single precision
print a
double a=1234.56789 'double precision
print a
String
string s="Hello"
print s
User Defined Type
typedef single MyFloat
MyFloat v=1234.5
print v
Compound Type
type vector3d double x,y,z
Vector3d v<=(1.5,2.5,3.5)
print v.y
Compound Type extended
type PartLabel
sys id
string name
double x,y,z
end type
'
PartLabel p
p.id=100 : p.name="Slider_1"
print "Name: " p.name " Identity No: " p.id
print sizeof p
|