Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
33
Task/Arrays/ALGOL-60/arrays.alg
Normal file
33
Task/Arrays/ALGOL-60/arrays.alg
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
begin
|
||||
comment arrays - Algol 60;
|
||||
|
||||
procedure static;
|
||||
begin
|
||||
integer array x[0:4];
|
||||
x[0]:=10;
|
||||
x[1]:=11;
|
||||
x[2]:=12;
|
||||
x[3]:=13;
|
||||
x[4]:=x[0];
|
||||
outstring(1,"static at 4: ");
|
||||
outinteger(1,x[4]);
|
||||
outstring(1,"\n")
|
||||
end static;
|
||||
|
||||
procedure dynamic(n); value n; integer n;
|
||||
begin
|
||||
integer array x[0:n-1];
|
||||
x[0]:=10;
|
||||
x[1]:=11;
|
||||
x[2]:=12;
|
||||
x[3]:=13;
|
||||
x[4]:=x[0];
|
||||
outstring(1,"dynamic at 4: ");
|
||||
outinteger(1,x[4]);
|
||||
outstring(1,"\n")
|
||||
end dynamic;
|
||||
|
||||
static;
|
||||
dynamic(5)
|
||||
|
||||
end arrays
|
||||
Loading…
Add table
Add a link
Reference in a new issue