Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-03-25
8
Medium Priority
?
158 Views
Last Modified: 2010-04-04
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.
0
Comment
Question by:PoeticAudio
6 Comments
 
LVL 9

Accepted Solution

by:
mocarts earned 100 total points
ID: 8203956
const
  aa: array [0..1,0..1] of string = (('a', 'b'),('c','d'));

wbr, mo. :)
0
 

Expert Comment

by:marusaki
ID: 8204048
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
 

Expert Comment

by:marusaki
ID: 8204057
mocarts, i didn't see your post, but you were the first one...

:-)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Author Comment

by:PoeticAudio
ID: 8204117
Wow, I feel stupid... Thought I tried that... it worked so I guess I didn't, thanks guys..

Regards,
Steve
0
 

Expert Comment

by:BLayman
ID: 8204565
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
 

Expert Comment

by:CleanupPing
ID: 9316616
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question