Difference between revisions of "Retys()"
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" |
int _retys(string) | int _retys(string) | ||
Line 35: | Line 35: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_curr_con() | lianjaapi_curr_con() |
Latest revision as of 09:04, 11 April 2013
PURPOSE
Return a currency string
SYNONYM
api_ret_ys()
SYNOPSIS
#include "lianja_api.h" int _retys(string) <input parameters> char *string; /*Address of a buffer containing a character string */ <output parameters> none
DESCRIPTION
The _retys() function returns a character string in the format "999999999999999.9999" as a currency type. The CURR_YTOS() function can be used to convert a currency value stored in a CURRENCY structure to a string format.
EXAMPLE
The following example evaluates the first parameter passed to a string and then returns the result.
Example Lianja script:
m_curr=$2873.89 m_curr=curr_con(m_curr) return
Example 'C' function:
#include "lianja_api.h" lianjaapi_curr_con() { char curr[21]; if ( _parinfo(1) == API_YTYPE ) { strcpy( curr, _parys(1)); } else { strcpy( curr, ""); } _retys (curr ); }
SEE ALSO
_parc(), _parclen(), _parcsiz(), _parinfo(), _parys(), _retc(), _retclen(), ISCURRENCY(), CURR_STOY(), CURR_YTOS()