Previously i have static array for the matrix dataset design
TMatrix = record
row, column: word; {m columns ,n strings }
Data: array[1..160, 1..160] of real
var
Mymatrix : TMatrix;
begin
Mymatrix.row := 160; - maximum size for row us is 160 for 2 x 2 static design.
Mymatrix.columns := 160; - maximum size for column us is 160 for 2 x 2 static design.
With the current design i can only have 160 x 160 in 2 dimensional matrix design. If i enter more array size [1..161, 1..161] , the compiler will alert for E2100 Data type too large: exceeds 2 GB error. So if i convert the code into dynamic array , i need to re-structure all my current code to read the matrix starts from 0 . Previoulsy , for static array the array will starts from 1. Some external functions it start to read the matrix from 1.
So , now i’m stuck with my current code which i need to create more than thousand N x N matrix size . With my current static array design everything went fine if below than 160 x 160 . So , i need to get any solutions without too much to change my current static array design.
Thanks.
It’s going to be easier to continue using 1-based indexing. You can do that a few different ways. For example:
The trick here is that even though the dynamic array uses 0 based indexing, you simply ignore the values stored in the 0 index. If ever you are porting code from Fortran which uses 1-based indexing, this approach is generally the most effective.