On 2022-03-31 03:06, Jay Maynard wrote:
ISTR that STRINGRANGE and STRINGSIZE carried a performance penalty, though it's been a very long time since I did PL/I. I would expect that the hit is
small but measurable, and generally worth it.

The overhead for STRINGSIZE is usually small, small enough to be trivial,
since it requires a comparison between the declared length and the
length of the string to be assigned.  Typically that requires
one each of L, C, and BC instructions.

The overhead for SUBSTR requires more checking, since there are now
two integer arguments that need to be tested.

On Wed, Mar 30, 2022 at 10:54 AM Robin Vowels <robi...@dodo.com.au> wrote:

On 2022-03-31 01:42, Seymour J Metz wrote:
> However, buffer overruns are characteristic of languages with no range
> checking. Of course, you can write C in PL/I with, e.g,
> (NOSTRINGRANGE) prefixes.

No, the appropriate condition is STRINGSIZE.
And that is disabled by default.
STRINGRANGE is disabled by default also.

It is always recommended to enable the STRINGSIZE condition.

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