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

Posted on 1998-05-23
Medium Priority
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!!!
Question by:Dave091277
1 Comment

Accepted Solution

jackb022197 earned 200 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:

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

Then you can declare a variable of the TTable type:

 BigTable: TTable;

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

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Healthcare has made massive developments over the past decade, thanks largely to technological advancement. Yet despite that these advancements are saving our lives, few truly understand how much healthcare has changed, and where it is headed.
Migrating Exchange data from one Exchange Server to another server is complicated. Though Exchange administrators can try manual methods to migrate their data from one version of Exchange to another, these manual methods are not that reliable. That…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

587 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