From: Patrik R. <pat...@us...> - 2001-11-20 15:44:26
|
Update of /cvsroot/hostess/hostess/oberon In directory usw-pr-cvs1:/tmp/cvs-serv24530 Modified Files: HOTCase0.Mod HOTConst2.Mod Log Message: use WITH insead of FOR (which is an Oberon-2 feature) Index: HOTCase0.Mod =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/HOTCase0.Mod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HOTCase0.Mod 2001/04/06 22:10:36 1.2 --- HOTCase0.Mod 2001/11/20 15:44:23 1.3 *************** *** 5,9 **** VAR i, val: LONGINT; BEGIN ! FOR i := 0 TO 10 DO CASE i OF | 0: val := 10 --- 5,10 ---- VAR i, val: LONGINT; BEGIN ! i := 0; ! WHILE i <= 10 DO CASE i OF | 0: val := 10 *************** *** 18,24 **** ASSERT((ODD(i) & (val = i)) OR (~ODD(i) & (val = (10-i)))); ! END - END Test0; --- 19,24 ---- ASSERT((ODD(i) & (val = i)) OR (~ODD(i) & (val = (10-i)))); ! INC(i) END END Test0; Index: HOTConst2.Mod =================================================================== RCS file: /cvsroot/hostess/hostess/oberon/HOTConst2.Mod,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** HOTConst2.Mod 2001/04/09 08:19:27 1.1 --- HOTConst2.Mod 2001/11/20 15:44:23 1.2 *************** *** 7,13 **** BEGIN (* these three notations are equivalent: *) ! FOR len:=0 TO LEN(int)-1 DO END; ! FOR len:=0 TO SHORT(LEN(int)-1) DO END; ! FOR len:=0 TO SHORT(LEN(int))-1 DO END END Test; --- 7,13 ---- BEGIN (* these three notations are equivalent: *) ! len:=0; WHILE len < LEN(int) DO INC(len) END; ! len:=0; WHILE len <= SHORT(LEN(int)-1) DO INC(len) END; ! len:=0; WHILE len <= SHORT(LEN(int))-1 DO INC(len) END END Test; |