Compound data type: Difference between revisions

m (→‎{{header|Phix}}: added syntax colouring, marked p2js compatible)
Line 1,672:
'SHORT FORM
type point float x,y
 
'FULL FORM
type point
Line 1,678:
float y
end type
 
point p
 
'WITH DEFAULT VALUES
type point
float x = 1.0
float y = 1.0
end type
 
point p = {} 'assigns the set of default values
 
 
print p.x " " p.y
</lang>
 
54

edits