Hi,
Let's suppose the following code, which is used as sample, that is to declare a Constant array of record:
type
TShopItem = record
Name : string;
Price : currency;
end;
const
Items : array[1..3] of TShopItem =
(
(Name : 'Clock'; Price : 20.99),
(Name : 'Pencil'; Price : 15.75),
(Name : 'Board'; Price : 42.96)
) ;
What if I want to declare a to declare a Constant array of array of record (array of array).
How do I declare that?
Taking the previous classes, now suppose that I have "groups" of TShopItem's, like :
Group 1
(Name : 'Clock'; Price : 20.99)
(Name : 'Pencil'; Price : 15.75)
Group 2
(Name : 'Board'; Price : 42.96)
(Name : 'Eraser'; Price : 2.96)
Group 3 (note different length)
(Name : 'Paper'; Price : 5.96)
(Name : 'Pen'; Price : 2.96)
(Name : 'Postits'; Price : 2.96)
How do I put all that in a single constant array of array declaration?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.