Another beginner question brought to you by Steve... More easy points guys!

Hey quick question, I know you guys must be loving my easy points. Anyways here it goes... How do I declare a static 2 dimentional array, must be a constant like

Const
  MyArray: Array[0..3] of String = ('aa', 'bb', 'cc', 'dd');

Okay that single dimentional array works fine of coarse, but say I want to make a table of this like

Const
  MyArray: Array[0..3, 0..3] of string = (??????? ***

*** okay this is where I get stuck. I dont know how to put in the values correctly, I always get an error that's like "incompatible Types: 'Array' and 'String' " no matter what I try. Remember this must be initialized in the constants section just like the first one is.
LVL 6
PoeticAudioAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mocartsCommented:
const
  aa: array [0..1,0..1] of string = (('a', 'b'),('c','d'));

wbr, mo. :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
marusakiCommented:
4-by-3 matrix of strings
const
MyArray: Array[1..4, 1..3] of string =(('11','12','13'),
                                       ('21','22','23'),
                                       ('31','32','33'),
                                       ('41','42','43'));

Every Delphi programmer was once a rookie...
No points, please!

Marius
0
marusakiCommented:
mocarts, i didn't see your post, but you were the first one...

:-)
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

PoeticAudioAuthor Commented:
Wow, I feel stupid... Thought I tried that... it worked so I guess I didn't, thanks guys..

Regards,
Steve
0
BLaymanCommented:
I bet you used ; instead of ,

That's what I did back when I first tried to use matrixes and couldn't get it to work.
0
CleanupPingCommented:
PoeticAudio:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

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.