Using OP
         IF TVOLL (IND1) NOT = HIGH-VALUE
         AND SMOD (IND1) = 'B' OR 'R'

I would do
         IF TVOLL (IND1) NOT = HIGH-VALUE
              IF SMOD (IND1) = 'B' OR 'R'
                  Do the stuff

> -----Original Message-----
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On
> Behalf Of Paul Gilmartin
> Sent: Friday, June 05, 2020 1:12 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: COBOL Question
> 
> On Fri, 5 Jun 2020 19:56:06 +0000, Gibney, Dave wrote:
> 
> >Also, it's often better to nest than to make compound conditions.
> >
> Do you mean not expanding the Distributive Law?  E.g. you prefer:
>     A and ( B or C )
> to:
>     A and B or A and C?
> 
> Do we need to talk about short-circuit evaluation?
> 
> >> -----Original Message-----
> >> From: Charles Mills
> >> Sent: Friday, June 05, 2020 12:54 PM
> >>
> >> I long ago decided never to bother looking up or thinking about
> >> operator precedence. If I am not immediately certain straight out of
> >> the box then I use parentheses.
> >>
> Me, too.  And I've been thwarted by a BASIC interpreter (Data General) and
> a Pascal compiler (Lightspeed) which incrementally compiled to internal
> pseudo-code (RPN?) and decompiled for listing (Infix) with bare minimum
> parentheses.  And frustrated my attempts to align decimal points vertically.
> 
> -- gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email to
> lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
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