Solved

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

Posted on 1998-05-23
261 Views
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
Question by:Dave091277
1 Comment

LVL 1

Accepted Solution

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

### Suggested Solutions

Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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…