minSubstringLength

The minSubstringLength build descriptor option specifies the smallest length that is allowed for a substring move before an IndexOutOfBoundsException is thrown.

This option is for variables used as indexes only. The check is made at run-time.

Any attempt to specify a pair of integer literals that would produce a length of 0 or less is considered an error by the validator. This is because a hard-coded substring length of 0 does not move any data and is therefore unnecessary.

Values

1 (the default value)
Specifies that the generated EGL program should throw an IndexOutOfBoundsException if the calculated substring length is less than 1.

Note that for EGL COBOL programs, this option only takes effect if the checkIndices build descriptor option is set to YES. For other environments, this option always takes effect.

0
Specifies that the generated EGL program should throw an IndexOutOfBoundsException if the calculated substring length is less than 0.

This allows an EGL program to use a calculated length of 0 in the substring move.