Compound data type: Difference between revisions

Content added Content deleted
(Add Nimrod)
Line 380: Line 380:
io:fwrite("X: ~f, Y: ~f~n",[P2#point.x,P2#point.y]).
io:fwrite("X: ~f, Y: ~f~n",[P2#point.x,P2#point.y]).
</lang>
</lang>


=={{header|Euphoria}}==
{{works with|OpenEuphoria}}
<lang euphoria>
enum x, y

sequence point = {0,0}

printf(1,"x = %d, y = %3.3f\n",point)

point[x] = 'A'
point[y] = 53.42

printf(1,"x = %d, y = %3.3f\n",point)
printf(1,"x = %s, y = %3.3f\n",point)
</lang>
{{out}}
<pre>
x = 0, y = 0.000
x = 65, y = 53.420
x = A, y = 53.420
</pre>


=={{header|Factor}}==
=={{header|Factor}}==