Retni()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Return an integer as a Recital numeric


SYNONYM

api_ret_ni()


SYNOPSIS

#include "dbapi.h"
 
int	_retni(n)
 
<input parameters>
int	n;		/* Numeric value		*/
 
<output parameters>
none


DESCRIPTION

The _retni() function returns an integer as a numeric value back to Recital.


EXAMPLE

The following example returns the length of a character string passed as the first parameter as an integer.

Example Recital program:

m_len=getlen("Recital")
return.

Example 'C' function:

#include "dbapi.h"
 
dbapi_getlen()
{
    int	value;
 
    if ( _parinfo(1)  == API_NTYPE ) {
       value =  _parni(1);
    } else {
       value = 0;
    }
 
    _retni( value );
}


SEE ALSO

_parinfa(), _parinfo(), parnd(), _parni(), _parl(), _retnd(), retnl(), ISNUM()