Q:

How to pass variable length array constant as a parameter?

I have many constants of 2-dimensional array with one dimension variable in length, like this :
const
  ThiamineRDA: array[0..2, 0..3] of Double =
   ((0, 0, 0.05, 0.2), (0, 0.06, 0.11, 0.3), (0, 1, 3, 0.5));
  RiboflavinRDA: array[0..1, 0..3] of Double =
   ((0, 0, 0.05, 0.2), (0, 0.06, 0.11, 0.3));

And I want to pass this constants as a parameter to a procedure:
  LoadIntakes(Item, ThiamineRDA);

But how cand I define that procedure to permit that parameter ?
procedure LoadIntakes(Item:PNutrientInfo; IntakesList: array of... ???? );
begin
 //.....
end;

A:

You can't pass open arrays that are open in 2 dimensions. But if one of the dimensions is fixed in size, you can do it, like this:
(I omitted your first parameter so that I could check that it does compile)
type
  TQArray = array[0..3] of double;
const
  ThiamineRDA: array[0..2] of TQArray =
   ((0, 0, 0.05, 0.2), (0, 0.06, 0.11, 0.3), (0, 1, 3, 0.5));
  RiboflavinRDA: array[0..1] of TQArray =
   ((0, 0, 0.05, 0.2), (0, 0.06, 0.11, 0.3));

procedure LoadIntakes( IntakesList: array of TQArray );
begin
 //.....
end;

procedure Test;
begin
  LoadIntakes( ThiamineRDA );
end;

