Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
begin
|
||||
procedure printSquare ( integer value x ) ; writeon( i_w := 1, s_w := 0, " ", x * x );
|
||||
% applys f to each element of a from lb to ub (inclusive) %
|
||||
procedure applyI ( procedure f; integer array a ( * ); integer value lb, ub ) ;
|
||||
for i := lb until ub do f( a( i ) );
|
||||
% test applyI %
|
||||
begin
|
||||
integer array a ( 1 :: 3 );
|
||||
a( 1 ) := 1; a( 2 ) := 2; a( 3 ) := 3;
|
||||
applyI( printSquare, a, 1, 3 )
|
||||
end
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue