On Sat, 11 Jul 2020 12:45:16 -0400, Arthur wrote:

>On 11 Jul 2020 08:52:59 -0700,  (Paul Gilmartin) wrote:
>
>>/* Not making a non-continued line a special case,
>>   I'd simplify the loop to: */
>>
>>signal on novalue  /* Always!  */
>>data = ''
>>do i = 1 to in.0
>>   parse value in.i with l 72 c 73 .
>>   data = data''l
>>   if c = ' ' then do
>>     say data
>>     data = ''
>>   end
>>end i
>
>if c = ' ' then exit 0
>
I approve.  Putting the shorter branch first improves legibility.

>say data
>exit 4 /* ended with a continuation */
>
Thanks.  I'm also uncomfortable that I need "data = ''" twice.
I consider the outside-and-inside initialization a maintenance
hazard.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to