You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

how to find lenght of string array?

1 reply [Last post]
Guest's picture
Guest

how to find lenght of string array?

Lepa's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 06/23/2008
Posts: 591
Re: how to find lenght of string array?

There is a "Len" array property class that you can use to return the length of an array.

Here is the definition from PeopleBooks:

Quote:
Len

The Len property is the current number of elements in the array. This property can be updated. Setting it to a negative value results in an error.

If this property is set to a smaller (nonnegative) number than its current value, the array is truncated to that length, discarding any elements whose indexes are larger than the given new length.

If this property is set to a number larger than its current value, the array is extended to the new length. Any new elements are set to a default value based on the element type of the array.

This property is read-write.

Example

The following is a test of whether an array is empty:

If &ARR.Len = 0 then
/* &ARR is empty. */
End-If;

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
13 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.