?
Solved

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

Posted on 2003-03-25
8
Medium Priority
?
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 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
Independent Software Vendors: 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!

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

770 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