Mark Johnson suggested the following change

><Before>
>GOOD.ANS=FALSE
>LOOP UNTIL GOOD.ANS DO
>   PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
>   IF ANS="Y" OR ANS="N" THEN GOOD.ANS=TRUE REPEAT
>
><after>
>LOOP WHILE TRUE DO
>   PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
>   IF ANS="Y" OR ANS="N" THEN EXIT
>REPEAT

These forms all work (Universe 10.2.0)  and are progressively shorter
than the above

        LOOP
           PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
           IF ANS="Y" OR ANS="N" THEN EXIT
        REPEAT


        LOOP
           PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
        UNTIL ANS="Y" OR ANS="N" DO
        REPEAT


        LOOP
           PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
        UNTIL ANS="Y" OR ANS="N" REPEAT


        LOOP PRINT "ENTER 'Y' OR 'N' ":;INPUT ANS
        UNTIL ANS="Y" OR ANS="N" REPEAT


Ray Wurlod was a great proponent of the LOOP WHILE READNEXT ID format.
I believe it may not compile on some MV systems.


Regards, Keith
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to