Solved

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

Posted on 1998-05-23
1
272 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSon parser in Delphi 1 6,735
Secure Boot on W8 & 8.1 8 46
Regular Expression to Split a String 7 110
searching for DavidI's "Mobile Summer School download" 3 132
Read about the ways of improving workplace communication.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 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