Retni()

From Recital Documentation Wiki
Revision as of 12:30, 30 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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()