Apr 29, 2004 #1 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
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
Apr 29, 2004 #2 Mike Gagnon Programmer Apr 6, 2002 8,067 CA 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. Upvote 0 Downvote
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.
Apr 29, 2004 #3 ChrisRChamberlain Programmer Mar 23, 2000 3,392 GB Code: [COLOR=blue]FOR i = 1 TO ALEN(MyArray) [tab]? MyArray[i,1] ENDF[/color] FAQ184-2483 - answering getting answered.Chris PDFcommander[sup]tm[/sup].com PDFcommander[sup]tm[/sup].co.uk Upvote 0 Downvote
Code: [COLOR=blue]FOR i = 1 TO ALEN(MyArray) [tab]? MyArray[i,1] ENDF[/color] FAQ184-2483 - answering getting answered.Chris PDFcommander[sup]tm[/sup].com PDFcommander[sup]tm[/sup].co.uk
Apr 29, 2004 #4 jimoo Programmer Jun 2, 2003 1,111 US 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 http://www.deltabg.com Upvote 0 Downvote
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 http://www.deltabg.com