| Author |
Counting rows in an Array
|
|
|
| In the beginning om my program I declare a number of arrays. Later in a procedure I need to count the number of "rows" i the erlier declared array. How to to that?
Hans
| |
| Roland Wingerter 2005-10-24, 8:24 pm |
| Hans wrote
> In the beginning om my program I declare a number of arrays. Later in a
> procedure I need to count the number of "rows" i the erlier declared
> array. How to to that?
--------
Sample for a one-dimensional array:
a = new array(10)
? a.size // 10
Sample for a two-dimensional array:
a = new array(5,2)
? a.size // 10
? alen(a,1) // number of rows: 5
? alen(a,2) // number of cols: 2
Roland
| |
|
| Hans wrote:
> In the beginning om my program I declare a number of arrays. Later in a procedure I need to count the number of "rows" i the erlier declared array. How to to that?
>
> Hans
I believe it is rows = alen(myarray,1) so long as it is a one or two
dimensional array.
Hope that helps
Glenn
|
|
|
|