Array of constant arrays!

Hi,
I have several(25) constant arrays that look like this

const
A:array[0..4]of integer=(56745,3457456,435457,435345,3345);
B:array[0..4]of integer=.................................................

Now I want to have an array that contains all these arrays or references to them.

I did this

const
ALLARRAY:array[0..24] of array[0..4] of integer=(A,B,C,D,E,F,......etc........);

my problem is that the compiler keeps telling me that constant expression expected with the cursor after the first element in ALLARRAY.
Any way to solve this?
thanks

xo310Asked:
Who is Participating?
 
jpedefConnect With a Mentor Commented:
Try this

const
  ALLARRAY: array[0..2, 0..4] of integer = ((0,1,2,3,4), (0,1,2,3,4), (0,1,2,3,4));

Or yours would be

ALLARRAY:array[0..24, 0..4] of integer=((0,1,...,24), (0,1,...,24)...);
0
 
kretzschmarCommented:
maybe also

type
  TBaseArray = Array[0..4] of integer;

const
  A : TBaseArray = (56745,3457456,435457,435345,3345);
  B : TBaseArray = (....

  AllArray : Array[0..24] of TBaseArray = (A,B,C,.....

just from head, means not tested and typos possible

meikl ;-)
0
 
xo310Author Commented:
thank you
I cant use the type coz the array is included in a class
The first will work however but will be the longest array i have ever seen.
did not see much:)
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
kretzschmarCommented:
>I cant use the type coz the array is included in a class
which may possible too
0
 
xo310Author Commented:
kretzschmar if this is possible then i want to open a new question
0
 
xo310Author Commented:
you mean declaring the type in the implementation section?
0
 
kretzschmarCommented:
well it depends on your classdefinition/classdesign and if you could change the definition itself,
so before you open a new q (which is not needed, we can handle this in this q (i need no points)),
we need to clarify this

meikl ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.