Hi,
I would like to ask how could one access the elements of a TDouble2DArray.
I was trying to achieve this using square brackets and comma as follows:
Element := DataMatrix[1,1];
however, I would get the following error:
Compiler: [Error] (126:35): Closing square bracket (']') expected
Kind regards,
Zuzana
Elements of a TDouble2DArray
Re: Elements of a TDouble2DArray
Hi Zuzana,
the TDouble2DArray is an open array declared as "array of array of double". Thus accessing a variable of type TDouble2DArray has to take this into account by using square brackets for each index.
Example, assigning a numeric value to a particular cell of the array:
Hope this helps,
Hans
the TDouble2DArray is an open array declared as "array of array of double". Thus accessing a variable of type TDouble2DArray has to take this into account by using square brackets for each index.
Example, assigning a numeric value to a particular cell of the array:
Code: Select all
var
my2da : TDouble2DArray;
...
my2da[i][j] := 2.3443; // (instead of my2da[i,j] := 2.3443;)
...
Hans
---
Hans Lohninger
Epina GmbH
Retz, Austria
Hans Lohninger
Epina GmbH
Retz, Austria
Re: Elements of a TDouble2DArray
Dear Hans,
thank you very much for your reply, it works perfectly!
Kind regards,
Zuzana
thank you very much for your reply, it works perfectly!
Kind regards,
Zuzana