gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Re: GM2 ISO


From: Iztok
Subject: Re: [Gm2] Re: GM2 ISO
Date: Wed, 07 May 2003 13:40:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903

Another one.

MODULE loopexit1;

VAR a,b,c,d,e : BOOLEAN;
   i : CARDINAL;
BEGIN
 LOOP
   IF b THEN
     EXIT;
   ELSE
     IF c THEN
       EXIT;
     ELSE
       d := e;
     END;
   END;
   EXIT;
 END;

 FOR i := 0 TO 1 DO
   EXIT;
 END;

 WHILE a DO
   EXIT;
 END;

 REPEAT
   EXIT;
 UNTIL b;
END loopexit1.


> gm2 -c -Wiso loopexit1.mod
loopexit1.mod:8:EXIT - only allowed in LOOP, WHILE, REPEAT, FOR statements
loopexit1.mod:11:EXIT - only allowed in LOOP, WHILE, REPEAT, FOR statements
loopexit1.mod:16:EXIT - only allowed in LOOP, WHILE, REPEAT, FOR statements
loopexit1.mod:20:EXIT - only allowed in LOOP, WHILE, REPEAT, FOR statements
loopexit1.mod:24:EXIT - only allowed in LOOP, WHILE, REPEAT, FOR statements
loopexit1.mod:28:EXIT - only allowed in LOOP, WHILE, REPEAT, FOR statements





reply via email to

[Prev in Thread] Current Thread [Next in Thread]