Difference between revisions of "ALENGTH()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
int ALENGTH(order) | int ALENGTH(order) | ||
Line 35: | Line 35: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_anum() | lianjaapi_anum() |
Latest revision as of 06:44, 11 April 2013
PURPOSE
Return the number of array elements
SYNONYM
None
SYNOPSIS
#include "lianja_api.h" int ALENGTH(order) <input parameters> int order; /*Placement in actual parameter list */ <output parameters> none
DESCRIPTION
The function returns the number of elements in the array. The order specifies the actual placement in the parameter list.
EXAMPLE
The following example returns the number of elements in the array passed as the first parameter.
Example Lianja script:
Declare m_values[20] m_anumber=anum(m_value) return.
Example 'C' function:
#include "lianja_api.h" lianjaapi_anum() { int numarray if (_parinfo(1) == API_ATYPE) { numarray = ALENGTH(1); } else { numarray = -1; } _retni(numarray); }
SEE ALSO
_parinfa(), _parinfo(), ISARRAY(), ARRAY_ALEN(), ARRAY_DEFINE(), ARRAY_LOOKUP(), ARRAY_UPDATE(), MEMVAR_DEFINE(), MEMVAR_LOOKUP(), MEMVAR_UPDATE()