PowerBuilder · Runtime error

R0066: Invalid subscript for array index

What does R0066: Invalid subscript for array index mean in PowerBuilder?

An array index expression evaluated to a value outside the array's valid range.

R0066: Invalid subscript for array indexPowerBuilder Classic · Appeon PowerBuilder

Condition

An array index expression evaluated to a value outside the array's valid range.

Fix

Check the index expression against the array's actual current bound with UpperBound(), the same class of mistake as R0003 but specifically surfaced through a subscript operation rather than a general array reference.

Pending source verification. Not yet checked against official documentation.

Related runtime error