Difference between revisions of "Retni()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
==SYNOPSIS==
 
==SYNOPSIS==
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
int _retni(n)
 
int _retni(n)
Line 27: Line 27:
  
 
<code lang="recital">
 
<code lang="recital">
m_len=getlen("Recital")
+
m_len=getlen("Lianja")
return.
+
return m_len
 
</code>
 
</code>
  
Line 34: Line 34:
  
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
lianjaapi_getlen()
 
lianjaapi_getlen()

Latest revision as of 13:52, 19 May 2014

PURPOSE

Return an integer as a numeric

SYNONYM

api_ret_ni()

SYNOPSIS

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

DESCRIPTION

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

EXAMPLE

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

Example Lianja script:

m_len=getlen("Lianja")
return m_len

Example 'C' function:

#include "lianja_api.h"
 
lianjaapi_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()