Compound data type: Difference between revisions
Content added Content deleted
(→{{header|Phix}}: added class-based alternative) |
|||
Line 1,658: | Line 1,658: | ||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
===traditional |
===traditional user defined type=== |
||
The sequence is a natural compound data type. The following would be the same without the type point and declaring p as a sequence, apart from the run-time error. There would be no difficulty defining point to have a string and two atoms. |
The sequence is a natural compound data type. The following would be the same without the type point and declaring p as a sequence, apart from the run-time error. There would be no difficulty defining point to have a string and two atoms. |
||
<lang Phix>enum x,y |
<lang Phix>enum x,y |
||
Line 1,683: | Line 1,683: | ||
Press Enter... |
Press Enter... |
||
</pre> |
</pre> |
||
===classes=== |
===classes=== |
||
{{libheader|Phix/Class}} |
{{libheader|Phix/Class}} |