Compound data type: Difference between revisions

m
→‎{{header|Sidef}}: simplified the code to uses a struct instead of a class
m (→‎{{header|Sidef}}: simplified the code to uses a struct instead of a class)
Line 1,570:
 
=={{header|Sidef}}==
<lang ruby>classstruct Point( {x, y) {};
var point = Point(1, 2);
say point.y; #=> 2</lang>
2,747

edits