PoeticAudio
asked on
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mocarts, i didn't see your post, but you were the first one...
:-)
:-)
ASKER
Wow, I feel stupid... Thought I tried that... it worked so I guess I didn't, thanks guys..
Regards,
Steve
Regards,
Steve
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.
That's what I did back when I first tried to use matrixes and couldn't get it to work.
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.
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.
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