Delphi – multiple types of arrays?

I want to know if there is a way to make an array with multiple types of data fields.

So far, I am using aMyArray: TPoint’s array [0..1]Array;

But now, this is not enough for me. I need to add 3 elements to the existing 2 “Point” elements to make it an array like aMyArray : (TPoint, TPoint, real, real, real) array

So each element of aMyArray has 5’child elements’, 2 of which are of TPoint type, and 3 of them are of’real’ type .

Is this possible in some way?

Maybe like a record

TMyType = record
Points: array[0..1] of TPoint;
Floats: array[0..2] of Real;
end;

TMyType = record
Point0: TPoint;
Point1: TPoint;
Float0: Real;
Float1: Real;< br /> Float2: Real;
end;

Suitable for you.

I want to know if there is a way to make one with multiple types Array of data fields.

So far, I am using aMyArray: array of TPoint[0..1] array;

But now, this works for me Not enough. I need to add 3 elements to the existing 2 “Point” elements to make it an array like aMyArray: (TPoint, TPoint, real, real, real) array

So aMyArray Each element has 5’child elements’, 2 of which are of type TPoint and 3 of them are of type’real’.

Is it possible to achieve this in some way?

Maybe like a record

TMyType = record
Points: array[ 0..1] of TPoint;
Floats: array[0..2] of Real;
end;

either

< pre>TMyType = record
Point0: TPoint;
Point1: TPoint;
Float0: Real;
Float1: Real;
Float2: Real;
end ;

For you.

Leave a Comment

Your email address will not be published.