Filling a multidimensional array as a constant

Posted on 2008-11-19
Last Modified: 2012-05-11
I have an array MyArray[1..140,1..6] of String, and as all the data is constant I want to hard-wire it as a constant.  What is the syntax for filling the array at design time.  (I know how to do it for one dimension, but not two!)
Question by:jdthedj
    LVL 6

    Expert Comment

      MyArray: array[1..3,1..2] of string = (('1A','1B'),('2a','2b'),('3a','3b'));

    just change the numbers and fill in the data according to the pattern!
    LVL 6

    Accepted Solution

    Or, perhaps this example makes it even easier:

      MyArray: array[1..3,1..6] of string =
    LVL 3

    Author Closing Comment

    Thanks Joseph!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now