Retys()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Pass a currency string to Recital


SYNONYM

api_ret_ys()


SYNOPSIS

#include "dbapi.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" to Recital as a Recital 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 Recital program:

m_curr=$2873.89
m_curr=curr_con(m_curr)
return

Example 'C' function:

#include "dbapi.h"
 
dbapi_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()