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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop through arrays

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
Hi,

How can I simply loop through all the elements of a two-dimensional array?

And how can I know how much elements there are in the array (COUNT)?

Thx

 
Informat

And how can I know how much elements there are in the array (COUNT)?

ALEN( ) Function
Returns the number of elements, rows, or columns in an array.

ALEN(ArrayName [, nArrayAttribute])

How can I simply loop through all the elements of a two-dimensional array?

ASCAN()


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Add a 2nd parameter to get the rows / columns.

? ALEN('ArrayName',1)
? ALEN(ArrayName,2)


lnItems = ALEN('ArrayName',1)
lnRows = ALEN('ArrayName',2)
FOR lni = 1 TO lnItems
FOR lnj = 1 TO lnRows
* whatever
ENDFOR
ENDDOR


Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top