home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
program
/
compiler
/
vici_102
/
examples
/
arrtst.e
next >
Wrap
Text File
|
1993-03-13
|
482b
|
33 lines
CLASS ARRTST
FEATURE
a: array[integer];
create is
local i:integer
do
a.create(1,10);
io.putint(a.lower);
io.putint(a.upper);
from i:= a.lower
invariant ForAll j: [a.lower .. i-1].a.item(j)=j
variant a.upper - i + 1
until i > a.upper
loop
a.put(i,i);
i:=i+1
end;
io.new_line;
from i:=a.upper
variant i + a.lower + 1
until i < a.lower
loop
io.putint(a.item(i));
io.new_line;
i:=i-1;
end;
end
end