On Wed, 17 Jul 2019 23:59:04 +0200, Bernd Oppolzer wrote:
>
>One program had a coding like this:
>
>    IF 9 < ZZ < 20 THEN DO;
>      ...
There's an argument here for strong typing, prohibiting comparing
a boolean to a numeric without a cast.

> ... Obviously this is not what the coder intended; the coder must have had
>a mathematics background.  He (or she) apparently asked for
>
>    IF (9 < ZZ) & (ZZ < 20) THEN DO;
>       ...
I have used one language that supported the prior construct, with the
mathematicians' semantic.  I avoided using that.

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