Why not something simple that works everywhere, like

loop
  readnext id else exit
  ...
repeat

/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006

On Mon, Mar 30, 2009 at 12:01 AM, Mecki Foerthmann <[email protected]> wrote:

> have you tried LOOP WHILE READNEXT ID DO ?
>
> MAJ Programming wrote:
>
>> LOOP WHILE READNEXT does not work on D3.
>> Mark Johnson
>> ----- Original Message ----- From: "Keith Johnson [DATACOM]" <
>> [email protected]>
>> To: <[email protected]>
>> Sent: Monday, March 02, 2009 7:38 PM
>> Subject: Re: [U2] DO/WHILE vs IF THEN
>>
>>
>>
>>
>>> 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
>>> [email protected]
>>> To unsubscribe please visit http://listserver.u2ug.org/
>>>
>>>
>> -------
>> u2-users mailing list
>> [email protected]
>> To unsubscribe please visit http://listserver.u2ug.org/
>>
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to