Anonymous user
Retrieving an Element of an Array: Difference between revisions
m
→{{header|ALGOL 68}}: nl ww - lang tag
m (→{{header|C}}: lang tag) |
m (→{{header|ALGOL 68}}: nl ww - lang tag) |
||
Line 27:
{{works with|ALGOL 68|Standard - no extensions to language used}}
{{works with|ALGOL 68G|Any - tested with release mk15-0.8b.fc9.i386}}
[[ELLA ALGOL 68]] translator has restrictions on the number of dimensions and hence cannot compile this code.
<lang algol>main:(
PROC get item = (REF [] INT array, INT index)INT:(
array[index]
Line 59 ⟶ 60:
r[3:5,] := f[1,1,1,1,,,1] # gets a 3x4 subarray of F into a 3x4 subarray of R starting in row 3 #
)</lang>
Output:
<pre>
|