Difference between revisions of "Parnd()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
double _parnd(order [,index])) | double _parnd(order [,index])) | ||
Line 36: | Line 36: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_condouble() | lianjaapi_condouble() |
Latest revision as of 08:56, 11 April 2013
PURPOSE
Convert a numeric to a double
SYNONYM
api_par_nd()
SYNOPSIS
#include "lianja_api.h" double _parnd(order [,index])) <input parameters> int order; /* Placement in actual parameter list */ int index; /* Array element index */ <output parameters> none
DESCRIPTION
The _parnd() function returns a numeric parameter as a double. 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 a double.
Example Lianja script:
m_double=1252 m_double =condouble(m_double) return
Example 'C' function:
#include "lianja_api.h" lianjaapi_condouble() { double value; if ( _parinfo(1) == API_NTYPE ) { value = _parnd(1); }else { value = 0; } _retnd( value ); }
SEE ALSO
_parinfa(), _parinfo(), _parni(), _parnl(), retnd(), _retni(), _retnl(), ISNUM()