Solved

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

Posted on 1998-05-23
1
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE, DataSnap, JSon and java 8 1,117
using a list of objects, Delphi 3 616
Inno Setup -> Add App Pin to Task Bar 1 811
Activex loadlibrary and show parented form issue 6 342
A hard and fast method for reducing Active Directory Administrators members.
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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