On Sun, 20 Jun 2021 10:48:09 +0100, Jeremy Nicoll wrote:
>>
>> For example, something like this:
>>
>> /* is this a user we want to process? */
>> do
>> if name='' then exit do /* no */
>> if st<>'NC' then exit do /* no */
>> amount=GetAmount(userID)
>> if amount>9999 then exit do /* no */
>> call ProcessUser; end
>>
"exit do" exits the EXEC, returning the value of the symbol DO
to its caller. Is that what was intended?
>Really? What's wrong with
>
>select
> when name='' then nop
> when st<>'NC' then nop
> when GetAmount(userID) > 9999 then nop
> otherwise call ProcessUser
>end
>
I dislike the negative logic, even as I'd rarely code:
if X<>Y
then nop
else whatever
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN