Parni()
From Lianjapedia
PURPOSE
Convert a numeric to an integer
SYNONYM
api_par_ni()
SYNOPSIS
#include "lianja_api.h" int _parni(order [,index])) <input parameters> int order; /* Placement in actual parameter list */ int index; /* Array element index */ <output parameters> none
DESCRIPTION
The _parni() function returns a numeric parameter as an integer. The order specifies the actual placement in the parameter list. If the parameter passed is an array, then the optional index value is used to specify the required element number.
EXAMPLE
The following example converts a numeric value passed as the first parameter to an integer.
Example Lianja script:
m_int=1252 m_double =conint(m_int) return
Example 'C' function:
#include "lianja_api.h" lianjaapi_conint() { int value; if (_parinfo(1) == API_NTYPE) { value = _parni(1); }else { value = 0; } _retni( value ); }
SEE ALSO
_parinfa(), _parinfo(), _parnd(), _parnl(), retnd(), _retni(), _retnl(), ISNUM()