Hi,

For now I know how to remove all elements in an array. But
how can I get its length? because I want to use for loop
to loop each elements in an array, thks.

Sam.

Re: How can I get the length of an array? by Gregory

Gregory
Sun Jun 29 04:46:02 CDT 2003

Sam,

There is the alen() function for that

Returns the number of elements, rows, or columns in an array.

Syntax

ALEN(ArrayName [, nArrayAttribute])

Returns

Numeric

Arguments

ArrayName

Specifies the name of the array. If you include only the array name, ALEN( )
returns the number of elements in the array.

nArrayAttribute

Determines whether ALEN( ) returns the number of elements, rows or columns
in the array according to the following values for nArrayAttribute:

0 Returns the number of elements in the array. Omitting
nArrayAttribute is identical to specifying 0.
1 Returns the number of rows in the array.
2 Returns the number of columns in the array. If the array is a
one-dimensional array, ALEN( ) returns 0 (no columns).

______________
"Sam" <sami_hung@canada.com> wrote in message
news:016d01c33e20$6da54890$a001280a@phx.gbl...
> Hi,
>
> For now I know how to remove all elements in an array. But
> how can I get its length? because I want to use for loop
> to loop each elements in an array, thks.
>
> Sam.


How can I get the length of an array? by spring1540

spring1540
Tue Jul 01 08:04:58 CDT 2003

The function ALEN is the answer to your question.

DIMENSION a(5)
?ALEN(a)

>-----Original Message-----
>Hi,
>
>For now I know how to remove all elements in an array.
But
>how can I get its length? because I want to use for loop
>to loop each elements in an array, thks.
>
>Sam.
>.
>