Solved

Multi Dimensional Arrays?????????

Posted on 1998-05-23
1
266 Views
Last Modified: 2010-04-16
Can anyone explain how I go about setting up and using a multi dimensional array. I have to write a program that will calculate the standard deviation of a bunch of numbers. The thing is though, there are about 6 lots of numbers. I can do a sinlge array ( ???? : Array [1..120] of real ) but for more columns I'm completely stuck. PLEASE HELP!!!
0
Comment
Question by:Dave091277
1 Comment
 
LVL 1

Accepted Solution

by:
jackb022197 earned 50 total points
ID: 1217036
As an example: This is how you would create a two-dimensional array that can hold all the values in a table that contains 20 columns and 20 rows:

type
 TTable = array[1..20, 1..20] of Double;

Then you can declare a variable of the TTable type:

var
 BigTable: TTable;

To initialize all the values in the table to 0.0, you could use nested for loops:

var
 Col, Row: Integer;
...
for Col := 1 to 20 do
 for Row:= 1 to 20 do
   BigTable[Col, Row] := 0.0
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

17 Experts available now in Live!

Get 1:1 Help Now