Reto()
From Lianjapedia
PURPOSE
Return an object as an object type
SYNONYM
api_ret_o()
SYNOPSIS
#include "lianja_api.h" int _reto(OBJECT) <input parameters> char OBJECT; /*Address of an object */ <output parameters> none
DESCRIPTION
The _reto() function returns an object as an object type.
EXAMPLE
The following example evaluates the first parameter passed to a string and then returns the result.
Example Lianja script:
m_name="NewObj" m_obj=obj_excp(m_name) return
Example 'C' function:
#include "lianja_api.h" lianjaapi_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 ); }