Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

arrays with 2 indices

Status
Not open for further replies.

consideration

Programmer
Aug 19, 2005
4
DE
hi,

in fortran 77, what does the second indice mean when
an array "x(2,5)" is defined (in this case ->5<-)?

can anyone explain me this code :

q(a,b) = q(a,b) + q(a,c)

Why a second indice and for what ?

THANKS in Advance
 
In C++
Code:
x(2,5)  means x[2][5] or x[3][6] if you want to start from 1 and ignore the 0 index.

q(a,b) = q(a,b) + q(a,c) means q[a][b] += q[a][c]
It depends entirely on the program as to what the second index is used for. Probably some row column thing in a matrix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top