Compound data type: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: added syntax colouring, marked p2js compatible) |
|||
Line 1,672: | Line 1,672: | ||
'SHORT FORM |
'SHORT FORM |
||
type point float x,y |
type point float x,y |
||
'FULL FORM |
'FULL FORM |
||
type point |
type point |
||
Line 1,678: | Line 1,678: | ||
float y |
float y |
||
end type |
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> |
</lang> |
||