Compound data type: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
imported>Acediast (→{{header|COBOL}}: added SECTION headers and forsyntax highlighting) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 575:
=={{header|COBOL}}==
A compound data item description is possible in COBOL as a subdivided record:
<syntaxhighlight lang="cobol"> DATA DIVISION.
WORKING-STORAGE SECTION.
01 Point.
05 x
05 y
Here the record <code>Point</code> has the subdivisions <code>x</code> and <code>y</code>, both of which are signed 16-bit binary integers.
=={{header|CoffeeScript}}==
Line 745 ⟶ 747:
=={{header|Elena}}==
ELENA 6.x:
<syntaxhighlight lang="elena">struct Point
{
constructor new(int x, int y)
Line 951 ⟶ 954:
3 4
</pre>
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
CGRect r = {0, 0, 250, 100}
printf @"x = %.f : y = %.f : width = %.f : height = %.f", r.origin.x, r.origin.y, r.size.width, r.size.height
HandleEvents
</syntaxhighlight>
{{output}}
<pre>
x = 0 : y = 0 : width = 250 : height = 100
</pre>
=={{header|Go}}==
Line 2,784 ⟶ 2,801:
=={{header|Wren}}==
<syntaxhighlight lang="
construct new(x, y) {
_x = x
|