Difference between revisions of "ALENGTH()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
Line 57: Line 57:
  
 
==SEE ALSO==
 
==SEE ALSO==
[[_parinfa()]], [[_parinfo()]], [[ISARRAY()]], [[ARRAY_ALEN()]], [[ARRAY_DEFINE()]], [[ARRAY_LOOKUP()]], [[ARRAY_UPDATE()]], [[MEMVAR_DEFINE()]], [[MEMVAR_LOOKUP]], [[MEMVAR_UPDATE()]]
+
[[_parinfa()]], [[_parinfo()]], [[ISARRAY()]], [[ARRAY_ALEN()]], [[ARRAY_DEFINE()]], [[ARRAY_LOOKUP()]], [[ARRAY_UPDATE()]], [[MEMVAR_DEFINE()]], [[MEMVAR_LOOKUP()]], [[MEMVAR_UPDATE()]]
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SDK]]
 
[[Category:SDK]]

Latest revision as of 12:22, 30 March 2009

PURPOSE

Return the number of array elements


SYNONYM

None


SYNOPSIS

#include "dbapi.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 Recital program:

Declare m_values[20]
m_anumber=anum(m_value)
return.

Example 'C' function:

#include "dbapi.h"
 
dbapi_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()