Does anyone know how to properly use arrays when the size is not known? When I try to use the array below, it gives me an "Invalid Subscript error". What is the syntax for instantiating an array whose size is not known at declaration time?
It won't let me do this either:
Code
positionRegisters: ARRAY[pr_Ending - pr_Starting] OF INTEGER
matrix : ARRAY[rows] OF ARRAY [columns] OF INTEGER
Do I have no other option than to provide an array size at declaration time? Like this:
With the code above everything runs just fine but it's way too limiting.
The ideal solution I'm looking for is to use dynamic integer variables for sizing the arrays but I'm not sure how to do this since the arrays must be created at VAR section before Variable Initializations.
Thanks for your help.