Reto()

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

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

Return an object to Recital as a Recital OBJECT type


SYNONYM

api_ret_o()


SYNOPSIS

#include "dbapi.h"
 
int	_reto(OBJECT)
 
<input parameters>
char	OBJECT;		/*Address of an object	*/
 
<output parameters>
none


DESCRIPTION

The _reto() function returns an object to Recital as a Recital OBJECT type.


EXAMPLE

The following example evaluates the first parameter passed to a string and then returns the result.

Example Recital program:

m_name="NewObj"
m_obj=obj_excp(m_name)
return

Example 'C' function:

#include "dbapi.h"
 
dbapi_obj_excp ()
{	
	OBJECT	objptr;
    char		name[33];
 
    if ( _parinfo(1) == API_CTYPE ) {
       strncpy( name, _parcs(1));
       name[32] = '0';
    } else {
       ERROR("Invalid Parameter.");
    }
 
	objptr = OBJECT_NEW(name, "exception", NULL); 	
    _reto (objptr );
}


SEE ALSO

_paro(), ISOBJECT()