INDEXING parameter is outside of the permitted range. NAV 2013

My Code looks like this:Barcodeinhalt[1] := 68;

Barcodeinhalt[2] := 69;
Barcodeinhalt[3] := 65;

Barcodeinhalt[11] := IntBuffer;

Barcodeinhalt[12] := IntBuffer;

Barcodeinhalt[22] := IntBuffer;

The error message appears at Barcodeinhalt[12]. It does only happen in NAV 2013, in 2009 Classic/RTC it works.#### Here the error message:


I never had this issue before. Its a report i converted from NAV 6.02.

This might help, it’s from the 2009 NAV Help file, in relationship to the CHAR data type.

Basically, you can’t, in 2009 RTC, assign a value to a position in a string that is greater than the position of the string’s null terminator. In this case, if Barcodeinhalt has a length of 9, with the null terminator being in position 10, then trying to assign a value to position 11 will raise a runtime error. May also still be the case in 2013.