This section describes each available method and its associated context.
RexxArrayObject arr; RexxObjectPtr obj1, obj2, obj3, obj4; >>--arr = context->Array(obj1);------------------------------------------>< >>--arr = context->Array(obj1, obj2);------------------------------------>< >>--arr = context->Array(obj1, obj2, obj3);------------------------------>< >>--arr = context->Array(obj1, obj2, obj3, obj4);------------------------><
This method has four forms. It create a new one-dimension Array with the specified objects.
Arguments
obj1 | The first object to be added. |
obj2 | The second object to be added. |
obj3 | The third object to be added. |
obj4 | The fourth object to be added. |
Returns
The new Array object.
RexxArrayObject arr; RexxObjectPtr obj; size_t n; >>--n = context->ArrayAppend(arr, obj);----------------------------------><
Append an Object to the end of an Array.
Arguments
Returns
The index of the appended object.
RexxArrayObject arr; CSTRING str; size_t n, len; >>--n = context->ArrayAppendString(arr, str, len);-----------------------><
Append an object to the end of an Array. The appended object is a String object created from a pointer and length.
Arguments
arr | The target Array object. |
str | A pointer to the string data to be appended. |
len | The length of the string value in characters. |
Returns
The Array index of the appended object.
RexxArrayObject arr; RexxObjectPtr obj; size_t idx; >>--obj = context->ArrayAt(arr, idx);------------------------------------><
Retrieve an object from a specified Array index.
Arguments
Returns
The object at the specified index. Returns NULLOBJECT if there is no value at the specified index.
RexxArrayObject arr; size_t sz; >>--sz = context->ArrayDimension(arr);-----------------------------------><
Returns number of dimensions of an Array.
Arguments
Returns
The number of Array dimensions.
RexxArrayObject arr; size_t sz; >>--sz = context->ArrayItems(arr);---------------------------------------><
Returns number of elements in an Array.
Arguments
Returns
The number of Array elements.
RexxArrayObject arr; RexxObjectPtr obj1, obj2, obj3, obj4; >>--arr = context->ArrayOfFour(obj1, obj2, obj3, obj4);------------------><
Create a new one-dimension Array with the specified objects.
Arguments
obj1 | The first object to be added. |
obj2 | The second object to be added. |
obj3 | The third object to be added. |
obj4 | The fourth object to be added. |
Returns
The new Array object.
RexxArrayObject arr; RexxObjectPtr obj1, obj2, obj3; >>--arr = context->ArrayOfThree(obj1, obj2, obj3);-----------------------><
Create a new one-dimension Array with the specified objects.
Arguments
obj1 | The first object to be added. |
obj2 | The second object to be added. |
obj3 | The third object to be added. |
Returns
The new Array object.
RexxArrayObject arr; RexxObjectPtr obj1, obj2; >>--arr = context->ArrayOfTwo(obj1, obj2);-------------------------------><
Create a new one-dimension Array with the specified objects..
Arguments
Returns
The new Array object.
RexxArrayObject arr; RexxObjectPtr obj; >>--arr = context->ArrayOfOne(obj);--------------------------------------><
Create a new one-dimension Array with the specified object.
Arguments
Returns
The new Array object.
RexxArrayObject arr; RexxObjectPtr obj; size_t idx; >>--context->ArrayPut(arr, obj, idx);------------------------------------><
Replace/add an Object to an Array.
Arguments
arr | The target Array object. |
obj | The object to be added. |
idx | The index into the Array object. This argument is 1-based. |
Returns
Void.
RexxArrayObject arr; size_t sz; >>--sz = context->ArraySize(arr);----------------------------------------><
Returns the size of an Array.
Arguments
Returns
The Array size.
RexxThreadContext *tc >>--success = context->AttachThread(&tc);-------------------------------><
Attaches the current thread to the Rexx interpreter instance context pointer.
Arguments
tc | Pointer to a RexxThreadContext pointer used to return a RexxThreadContext for the attached thread. |
Returns
Boolean value. 1 = success, 0 = failure. If the call was successful, a RexxThreadContext object valid for the current context is returned via the tc argument.
RexxBufferObject obj; POINTER str; >>--str = context->BufferData(obj);--------------------------------------------><
Returns a pointer to a Buffer object's data area.
Arguments
Returns
The C pointer to the Buffer object's data area.
RexxBufferObject obj; size_t sz; >>--sz = context->BufferLength(obj);-------------------------------------><
Return the length of a Buffer object's data area.
Arguments
Returns
The length of the Buffer object's data area.
RexxBufferStringObject obj; POINTER str; >>--str = context->BufferStringData(obj);--------------------------------------><
Returns a pointer to a RexxBufferString object's data area.
Arguments
Returns
The C pointer to the RexxBufferString's data area. This is a writable data area, but the RexxBufferString must be finalized using FinishBufferString() before it can be used in any other context.
RexxBufferStringObject obj; size_t sz; >>--sz = context->BufferStringLength(obj);-------------------------------><
Return the length of a RexxBufferStringObject instance.
Arguments
Returns
The length of the RexxBufferStringObject.
CSTRING name; RexxObjectPtr ret; RexxArrayObject arr; >>--ret = context->CallProgram(name, arr);----------------------------><
Returns the result object of the routine.
Arguments
Returns
Any result object returned by the program. NULLOBJECT is returned if the program does not return a value. Any errors involved with calling the program will will return a NULLOBJECT result. The CheckCondition(). can be used to check if any errors occurred during the call.
RexxObjectPtr obj, ret; RexxArrayObject arr; >>--ret = context->CallRoutine(obj, arr);-----------------------------><
Returns the result object of the routine.
Arguments
Returns
Any result object returned by the Routine. NULLOBJECT is returned if the program does not return a value. Any errors involved with calling the program will will return a NULLOBJECT result. The CheckCondition(). can be used to check if any errors occurred during the call.
logical_t flag; >>--flag = context->CheckCondition();------------------------------------><
Checks to see if any conditions have resulted from a call to a Rexx API. .
Arguments
None.
Returns
1 = if a condition has been raised, 0 = no condition raised.
>>--context->ClearCondition();-------------------------------------------><
Clears any pending condition status.
Arguments
None.
Returns
Void.
RexxObjectPtr obj; RexxStringObject ostr; CSTRING str; >>--str = context->CString(obj);----------------------------------------->< >>--ostr = context->CString(str);----------------------------------------><
There are two forms of this method. The first converts an Object into a C ASCII-Z string. The second converts C ASCII-Z string into a String object.
Arguments
Returns
For the first method form, a CSTRING representation of the object is returned. For the second form, a String object is created from the ASCII-Z string data..
RexxDirectoryObject dirj; RexxCondition cond; >>--context->DecodeConditionInfo(dir, &cond);----------------------------><
Decodes the condition information into a RexxCondition structure.
Arguments
dir | The source Directory object containing the condition information. |
cond | A pointer to the RexxCondition structure. |
Returns
Void. The cond structure is updated with information from dir.
>>--context->DetachThread()-------------;-------------------------------><
Detaches the thread represented by the RexxThreadContext object from it's interpreter instance. Once DetachThread() is called, the RexxThreadContext object issuing the call is no longer a valid, active interface.
Arguments
None
Returns
Void.
RexxDirectoryObject dirobj; RexxObjectPtr obj; CSTRING str; >>--obj = context->DirectoryAt(dirobj, str);-----------------------------><
Return the object at the specified index.
Arguments
Returns
The object at the specified index. Returns NULLOBJECT if the given index does not exist.
RexxDirectoryObject dirobj; RexxObjectPtr index; CSTRING str; >>--context->DirectoryPut(dirobj, index, str);---------------------------><
Replace/add an Object at the specified Directory index.
Arguments
dirobj | The source Directory object. |
index | The ASCII-Z string index into the Directory object. |
str | The object instance to be stored at the index. |
Returns
Void.
RexxDirectoryObject dirobj; RexxObjectPtr obj; CSTRING str; >>--obj = context->DirectoryRemove(dirobj, str);-------------------------><
Removes and returns the object at the specified Directory index.
Arguments
Returns
The object removed at the specified index. Returns NULLOBJECT if the index did not exist in the target Directory.
RexxObjectPtr obj; double n; logical_t flag; >>--obj = context->Double(n);-------------------------------------------->< >>--flag = context->Double(obj, &n);-------------------------------------><
There are two forms of this method. The first form converts C double value to an Object. The second form converts an Object to a C double value.
Arguments
n | For the first method form, the double value to be converted. For the second method form, the target of the conversion. |
obj | The object to be converted.. |
Returns
For the first method form, returns an Object version of the double value. For the second method form, 0 - success, 1 = failure. If successful, the converted value is placed in n.<
RexxObjectPtr obj; double n; >>--obj = context->DoubleToObject(n);------------------------------------><
Converts C double value to an Object.
Arguments
Returns
An Object representation of the double value.
RexxObjectPtr obj; size_t p; double n; >>--obj = context->DoubleToObject(n, p);---------------------------------><
Converts C double value to an Object with a specific precision.
Arguments
Returns
An Object representation of the double value.
CSTRING name; >>--context->DropContextVariable(name);-------------------------------><
Drops a Rexx variable in the current routine's caller variable context.
Arguments
Returns
Void.
CSTRING str; >>--context->DropObjectVariable(str);------------------------------------><
Drops an instance variable in the current method's scope.
Arguments
Returns
Void.
RexxStemObject sobj; size_t n; >>--context->DropStemArrayElement(sobj, n);------------------------------><
Drops an element of the Stem object.
Arguments
Returns
Void.
RexxStemObject sobj; CSTRING name; >>--context->DropStemElement(sobj, name);--------------------------------><
Drops an element of the Stem object.
Arguments
Returns
Void.
RexxObjectPtr obj; >>--obj = context->False();----------------------------------------------><
This method returns the Rexx .false ( 0 ) object.
Arguments
None.
Returns
The Rexx .false object.
RexxClassObject class; CSTRING name; >>--class = context->FindClass(name);---------------------------------><
Locates a Class object in the current thread context.
Arguments
Returns
The located Class object. Returns NULLOBJECT if the class is not found.
CSTRING name; RexxClassObject obj; >>--obj = context->FindContextClass(name);-------------------------------><
Locate a Class object in the current Method or Routine Package context.
Arguments
Returns
The located Class object. Returns NULLOBJECT if the class is not found.
RexxPackageObject pkg; RexxClassObject class; CSTRING name; >>--class = context->FindPackageClass(pkg, name);---------------------><
Locate a class object in a given Package object's context.
Arguments
pkg | The Package object used to resolve the class. |
name | An ASCII-Z string containing the name of the class. |
Returns
The located Class object. Returns NULLOBJECT if the class is not found.
RexxBufferStringObject obj; RexxStringObject strobj; size_t len; >>--str = context->FinishBufferString(obj, len);---------------------------><
Converts a RexxBufferStringObject into a completed, immutable String object of the given length and returns a reference to the completed String object.
Arguments
Returns
The finalized Rexx string object.
CSTRING str; RexxObjectPtr obj, ret; RexxClassObject sobj; RexxArrayObject arr; >>--ret = context->ForwardMessage(obj, str, cobj, arr);------------------><
Forwards a message to a different object or method. This is equivalent to using a FORWARD CONTINUE instruction from Rexx code.
Arguments
obj | The object to receive the message. If NULL, the object that is the target of the current method call is used. |
str | The message name to use. If NULL, then the name of the current method is used. |
cobj | The class scope used to locate the method. If NULL, this will be an unscoped method call. |
arr | The Array of message arguments. If NULL, the same arguments that were used on the current method invocation will be used. |
Returns
The invoked message result. NULLOBJECT will be returned if the target method does not return a result.
RexxDirectoryObject obj; >>--obj = context->GetAllContextVariables();--------------------------><
Returns all the Rexx variables in the current routine's caller's context as a Directory. Only simple variables and stem variables are included in the Directory. Stem variable entries will have a Stem object as the value. Compound variables may be accessed via the Stem object values.
Arguments
None.
Returns
A RexxDirectoryObject with the variable names and values.
RexxStemObject sobj; RexxDirectoryObject obj; >>--obj = context->GetAllStemElements(sobj);-----------------------------><
Returns all elements of a Stem object as a Directory object. Each assigned Stem tail element will be an entry in the Directory.
Arguments
Returns
The Directory object containing the Stem variable values.
>>--ptr = context->GetApplicationData();------------------------------><
Returns the application data pointer that was set via the APPLICATION_DATA option when the intepreter instance was created.
Arguments
None.
Returns
The application instance data set when the interpreter instance was created.
RexxObjectPtr obj; size_t n; >>--obj = context->GetArgument(n);------------------------------------><
Returns the specified argument to the method or routine. This is equivalent to calling Arg(n) from within Rexx code.
Arguments
Returns
The object corresponding to the given argument position. Returns NULLOBJECT if the argument was not specified.
RexxArrayObject arr; >>--arr = context->GetArguments();------------------------------------><
Returns an Array object of the arguments to the method or routine. This is the same argument Array returned by the ARGLIST argument type.
Arguments
None.
Returns
The Array object containing the method or routine arguments.
RexxObjectPtr obj; >>--obj = context->GetCallerContext();--------------------------------><
Get the RexxContext object corresponding to the routine or exit's calling context.
Arguments
None.
Returns
The current exit or routine caller's RexxContext object.
RexxDirectoryObject dir; >>--dir = context->GetConditionInfo();--------------------------------><
Returns a Directory object containing the condition information. This is equivalent to calling Condition('O') from within Rexx code.
Arguments
None.
Returns
The RexxDirectoryObject containing the condition information. If there are no pending conditions, NULLOBJECT is returned.
stringsize_t sz; >>--sz = context->GetContextDigits();---------------------------------><
Get the routine caller's current NUMERIC DIGITS setting.
Arguments
None.
Returns
The current NUMERIC DIGITS setting.
stringsize_t sz; >>--sz = context->GetContextForm();-----------------------------------><
Get the routine caller's current NUMERIC FORM setting.
Arguments
None.
Returns
The current NUMERIC FORM setting.
stringsize_t sz; >>--sz = context->GetContextFuzz();-----------------------------------><
Get the routine caller's current NUMERIC FUZZ setting.
Arguments
None.
Returns
The current NUMERIC FUZZ setting.
RexxObjectPtr obj; CSTRING name; >>--obj = context->GetContextVariable(name);--------------------------><
Gets the value of a Rexx variable in the routine or exit caller's variable context. Only simple variables and stem variables can be retrieved with GetContextVariable(). The value returned for a stem variable will be the corresponding Stem object. Compound variable values can be retrieved from the corresponding Stem values.
Arguments
Returns
The value of the named variable. Returns NULLOBJECT if the variable has not been assigned a value.
RexxDirectoryObject dir; >>--dir = context->GetGlobalEnvironment();----------------------------><
Returns a reference to the .environment Directory.
Arguments
None.
Returns
A RexxDirectoryObject pointer to the .environment Directory.
RexxDirectoryObject dir; >>--dir = context->GetLocalEnvironment();-----------------------------><
Returns a reference to the interpreter instance .local Directory.
Arguments
None.
Returns
A RexxDirectoryObject pointer to the .local Directory.
CSTRING str; >>--str = context->GetMessageName(obj);-------------------------------><
Returns the message name used to invoke the current method.
Arguments
None.
Returns
The current method message name.
RexxMethodObject obj; >>--obj = context->GetMethod();---------------------------------------><
Returns the Method object for the currently executing method.
Arguments
None.
Returns
The current Method object.
RexxMethodObject obj; RexxPackageObject pkg; >>--pkg = context->GetMethodPackage(obj);-----------------------------><
Returns the Package object associated with the specified Method instance.
Arguments
Returns
The Method's defining Package object.
CSTRING str; RexxObjectPtr obj; >>--obj = context->GetObjectVariable(str);-------------------------------><
Retrieves a Rexx instance variable value from the current object's method scope context. Only simple variables and stem variables can be retrieved with GetObjectVariable(). The value returned for a stem variable will be the corresponding Stem object. Compound variable values can be retrieved from the corresponding Stem values.
Arguments
Returns
The object assigned to the named object variable. Returns NULLOBJECT if the variable has not been assigned a value.
RexxDirectoryObject dir; RexxPackageObject pkg; >>--dir = context->GetPackageClasses(pkg);----------------------------><
Returns a Directory object containing the Package public and private classes, indexed by class name.
Arguments
Returns
A Directory object containing the package classes.
RexxDirectoryObject dir; RexxPackageObject pkg; >>--dir = context->GetPackageMethods(pkg);----------------------------><
Returns a Directory object containing the Package unattached methods, indexed by Method name. This is equivalent to using the .methods environment symbol from Rexx code.
Arguments
Returns
A Directory object containing the Package's unattached methods.
RexxDirectoryObject dir; RexxPackageObject pkg; >>--dir = context->GetPackagePublicClasses(pkg);----------------------><
Returns a Directory object containing the Package public classes, indexed by class name.
Arguments
Returns
A Directory object containing the public classes.
RexxDirectoryObject dir; RexxPackageObject pkg; >>--dir = context->GetPackagePublicRoutines(pkg);---------------------><
Returns a Directory object containing the Package public routines, indexed by routine name.
Arguments
Returns
A Directory object containing the public routines.
RexxDirectoryObject dir; RexxPackageObject pkg; >>--dir = context->GetPackageRoutines(pkg);---------------------------><
Returns a Directory object containing the Package public and private routines, indexed by routine name.
Arguments
Returns
A Directory object containing the routines.
RexxRoutineObject obj; >>--obj = context->GetRoutine();--------------------------------------><
Returns current Routine object.
Arguments
None
Returns
The current Routine object.
CSTRING name; >>--name = context->GetRoutineName();---------------------------------><
Returns the name of the current routine.
Arguments
None
Returns
A pointer ASCII-Z routine name.
RexxRoutineObject obj; RexxPackageObject pkg; >>--pkg = context->GetRoutinePackage(obj);----------------------------><
Returns Routine object's associated Package object.
Arguments
Returns
The Package object instance.
RexxObjectPtr obj; >>--obj = context->GetScope();----------------------------------------><
Return the current active method's scope.
Arguments
None.
Returns
The current Method's scope.
RexxObjectPtr obj; >>--obj = context->GetSelf();-----------------------------------------><
Returns the Object that is the current method's message target. This is equivalent to the SELF variable in a Rexx method. The same value can be accessed as a method argument using the OSELF type.
Arguments
None.
Returns
The current SELF object.
RexxStemObject sobj; RexxObjectPtr obj; size_t n; >>--obj = context->GetStemArrayElement(sobj, n);-------------------------><
Retrieves an element of a Stem object using a numeric index.
Arguments
sobj | The source Stem object. |
n | The Stem object element number. The numeric index is translated into the corresponding String tail. |
Returns
The Object stored at the target index or NULLOBJECT if the target index has not been assigned a value.
RexxStemObject sobj; RexxObjectPtr obj; CSTRING name; >>--obj = context->GetStemElement(sobj, name);---------------------------><
Retrieves an element of a Stem object.
Arguments
sobj | The source Stem object. |
name | The Stem object element name. This is a fully resolved tail name, taken as a constant. No variable substitution is performed on the tail. |
Returns
The the object at the target index or NULLOBJECT if the target index has not been assigned a value.
RexxStemObject sobj; RexxObjectPtr obj; CSTRING name; >>--obj = context->GetStemValue(sobj);-----------------------------------><
Retrieves the base name value of a Stem object.
Arguments
Returns
The Stem object's default base value.
RexxObjectPtr obj; >>--obj = context->GetSuper();----------------------------------------><
Returns the current method's super class scope. This is equivalent to the SUPER variable used from Rexx code. This value can also be obtained via the SUPER method argument type.
Arguments
None.
Returns
The current method's SUPER scope.
>>--context->Halt();-----------------------------------------------------><
Raise a HALT condition on all threads associated with the interpreter instance.
Arguments
None.
Returns
Void.
>>--context->HaltThread();----------------------------------------------><
Raises a HALT condition on the thread corresponding to the current context pointer.
Arguments
None
Returns
Void.
logical_t flag; RexxObjectPtr obj; CSTRING name; >>--flag = context->HasMethod(obj, name);-------------------------------><
Tests if an object supports the specified method name.
Arguments
Returns
1 = the method exists, 0 = the method does not exist.
RexxDirectoryObject obj; >>--context->InvalidRoutine();----------------------------------------><
Raises the standard Error 40, "Invalid call to routine" synatx error for the current routine. This error will be raised by the Rexx runtime once the routine returns.
Arguments
None.
Returns
Void.
RexxObjectPtr obj; logical_t flag; int32_t n; >>--obj = context->Int32(n);--------------------------------------------->< >>--logical_t = context->Int32(obj, &n);---------------------------------><
There a two forms of this method. The first form converts a C 32-bit integer n to an Object. The second form converts an Object to a C 32-bit integer, returning it in n.
Arguments
n | For the first form, the value to be converted. For the second form, the converted result. |
obj | The object to be converted. |
Returns
For the first form, n Object representation of the integer value. For the second form, returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; int32_t n; >>--obj = context->Int32ToObject(n);-------------------------------------><
Convert a C 32-bit integer n to an Object.
Arguments
Returns
An Object representation of the integer value.
RexxObjectPtr obj; logical_t flag; int64_t n; >>--obj = context->Int64(n);--------------------------------------------->< >>--logical_t = context->Int64(obj, &n);---------------------------------><
There a two forms of this method. The first form converts a C 64-bit integer n to an Object. The second form converts an Object to a C 64-bit integer and returns in n.
Arguments
n | For the first form, the integer to be converted. For the second form, the converted integer. |
obj | The object to be converted. |
Returns
For the first form, an Object representation of the integer value. For the second form, returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; int64_t n; >>--obj = context->Int64ToObject(n);-------------------------------------><
Convert the C 64-bit integer n to an Object.
Arguments
Returns
An Object representing the integer value.
size_t version; >>--version = context->InterpreterVersion();----------------------------><
Returns the version of the interpreter. The returned version is encoded in the 3 least significant bytes of the returned value, using 1 byte each for the interpreter version, release, and revision values. For example, on a 32-bit platform, this value would be 0x00040000 for version 4.0.0. The oorexxapi.h header file will have a define matching these values using the naming convention REXX_INTERPRETER_4_0_0 and the macro REXX_CURRENT_INTERPRETER_VERSION will give the interpreter version used to compile your code.
Arguments
None.
Returns
The interpreter version number.
RexxObjectPtr obj; logical_t flag; intptr_t n; >>--obj = context->Intptr(&n);------------------------------------------->< >>--flag = context->Intptr(obj, &n);-------------------------------------><
There are two forms of this method. The first form converts the C signed integer n to an Object. The second form converts an Object to a C signed integer and returns it in n.
Arguments
n | For the first form, the value to be converted. For the second form, the conversion result. |
obj | The object to be converted. |
Returns
For the first form, an Object version of the integer value. For the second form, returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; intptr_t n; >>--obj = context->IntptrToObject(&n);-----------------------------------><
Convert the C signed integer n to an Object.
Arguments
Returns
An Object representing the integer value.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsArray(obj);---------------------------------------><
Tests if an Object is an Array. A true result indicates the RexxObjectPtr value may be safely cast to a RexxArrayObject.
Arguments
Returns
1 = is an Array object, 0 = not an Array object.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsBuffer(obj);--------------------------------------><
Tests if an Object is a Buffer object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxBufferObject.
Arguments
Returns
1 = is a Buffer object, 0 = not a Buffer object.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsDirectory(obj);-----------------------------------><
Tests if an Object is a Directory object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxDirectoryObject.
Arguments
Returns
1 = is a Directory object, 0 = not a Directory object.
RexxObjectPtr obj; RexxClassObj class; logical_t flag; >>--flag = context->IsInstanceOf(obj, class);---------------------------><
Tests if an Object is an instance of the specified class.
Arguments
Returns
1 = is an instance, 0 = not an instance.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsMethod(obj);--------------------------------------><
Tests if an Object is a Method object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxMethodObject.
Arguments
Returns
1 = is a Method object, 0 = not a Method object.
RexxObjectPtr obj; CSTRING class; logical_t flag; >>--flag = context->IsOfType(obj, class);-------------------------------><
Tests an object to see if it is an instance of the named class. This method combines the operations of the FindClass() and IsInstanceOf() methods in a single call.
Arguments
obj | The object to be tested. |
class | An ASCII-Z string containing the name of the Rexx class. The named class will be located in the current context and used in an IsInstanceOf() test. |
Returns
1 = is an instance, 0 = not an instance or the named class cannot be located.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsPointer(obj);-------------------------------------><
Tests if an Object is a Pointer object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxPointerObject.
Arguments
Returns
1 = is a Pointer object, 0 = not a Pointer object.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsRoutine(obj);-------------------------------------><
Tests if an Object a Routine object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxPointerObject.
Arguments
Returns
1 = is a Routine object, 0 = not a Routine object.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsStem(obj);----------------------------------------><
Tests if an Object is a Stem object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxStemObject.
Arguments
Returns
1 = is a Stem object, 0 = not a Stem object.
RexxObjectPtr obj; logical_t flag; >>--flag = context->IsString(obj);--------------------------------------><
Tests if an Object is a String object. A true result indicates the RexxObjectPtr value may be safely cast to a RexxStringObject.
Arguments
Returns
1 = is a String object, 0 = not a String object.
size_t langlevel; >>--langlevel = context->LanguageLevel();-------------------------------><
Returns the language blevel of the interpreter. The returned language level is encoded in the 2 least significant bytes of the returned value, using 1 byte each for the interpreter version, release, and revision values. For example, on a 32-bit platform, this value would be 0x00000603 for language level 6.03. The oorexxapi.h header file will have a define matching these values using a the naming convention REXX_LANGUAGE_6_03 and the macro REXX_CURRENT_LANGUAGE_LEVEL will give the interpreter version used to compile your code.
Arguments
None.
Returns
The interpreter language level number.
CSTRING name; logical_t success; >>--logical_t = context->LoadLibrary(name);---------------------------------><
Loads an external library with the given name and adds it to the global Rexx environment.
Arguments
name | The ASCII-Z path/name of the library package, in format required by the ::REQUIRES LIBRARY directive. |
Returns
True if the library was successfully loaded or the library had been previously loaded. False is returned for any errors in loading the package.
CSTRING name; RexxPackageObject pkg; >>--pkg = context->LoadPackage(name);---------------------------------><
Returns the Package object loaded from the specified file path/name.
Arguments
Returns
The loaded Package object. Any errors resulting from loading the package will return a NULLOBJECT value. Information about errors can be retrieved using GetConditionInfo().
CSTRING name, data; size_t sz; RexxPackageObject pkg; >>--pkg = context->LoadPackageFromData(name, data, sz);---------------><
Returns the loaded package object from the specified file path/name.
Arguments
name | The ASCII-Z name assigned to the package. |
data | Data buffer containing the package Rexx. |
sz | The size of the data buffer. |
Returns
The loaded Package object. Any errors resulting from loading the package will return a NULLOBJECT value. Information about errors can be retrieved using GetConditionInfo().
RexxObjectPtr obj; logical_t flag, n; >>--flag = context->Logical(obj, &n);------------------------------------>< >>--obj = context->Logical(n);-------------------------------------------><
This method has two forms. The first form converts an Object to a C logical value (0 or 1). The second form converts a C logical value to an Object.
Arguments
obj | The object to be converted. |
n | For the first method form, a C pointer to a logical_t to receive the conversion result. For the second form, a logical_t to be converted to an Object. |
Returns
For the first method form, 1 = success and 0 = conversion error, with the converted value placed in n For the second form, an Object version of the logical value.
RexxObjectPtr obj; logical_t flag, n; >>--obj = context->LogicalToObject(n);-----------------------------------><
Converts a C logical value to an Object.
Arguments
Returns
Either the .false or .true object is returned.
RexxArrayObject obj; size_t len; >>--obj = context->NewArray(d);------------------------------------------><
Create an Array object of the specified size.
Arguments
Returns
The new Array object.
RexxBufferObject obj; size_t len; >>--obj = context->NewBuffer(len);---------------------------------------><
Create a Buffer object with a specific data size.
Arguments
Returns
The new Buffer object.
RexxBufferStringObject obj; size_t len; >>--obj = context->NewBufferString(len);---------------------------------><
Create a RexxBufferString with the indicated buffer size. A RexxBufferString is a mutable String object that can be used to construct return values. You must use FinishBufferString() to transform this into a completed String object.
Arguments
Returns
A new RexxBufferString value.
RexxDirectoryObject obj; >>--obj = context->NewDirectory();---------------------------------------><
Create a Directory object.
Arguments
None
Returns
The new Directory object.
RexxMethodObject obj; CSTRING name, code; size_t sz; >>--obj = context->NewMethod(name, code, sz);----------------------------><
Create a new Method object from an in-memory buffer.
Arguments
name | ASCII-Z name of the method. |
code | A data buffer containing the new method's Rexx code. |
sz | Size of the code buffer. |
Returns
The created Method object. Any errors resulting from creating the method will return a NULLOBJECT value. Information about any error can be retrieved using GetConditionInfo().
RexxPointerObject obj; POINTER p; >>--obj = context->NewPointer(p);----------------------------------------><
Create a new Pointer object from a C pointer.
Arguments
Returns
The created Pointer object.
RexxRoutineObject obj; CSTRING name, code; size_t sz; >>--obj = context->NewRoutine(name, code, sz);---------------------------><
Create a new Routine object from an in-memory buffer.
Arguments
name | ASCII-Z name of the routine. |
code | Buffer containing the routine Rexx code. |
sz | Size of the code buffer. |
Returns
The new Routine object. Any errors resulting from creating the the routine will return a NULLOBJECT value. Information about errors can be retrieved using GetConditionInfo().
RexxStemObject obj; CSTRING str; >>--obj = context->NewStem(str);-----------------------------------------><
Create an new Stem object with the specified base name.
Arguments
Returns
The new Stem object.
RexxStringObject obj; CSTRING str; size_t len; >>--obj = context->NewString(str, len);---------------------------------->< >>--obj = context->NewString(str);---------------------------------------><
There are two forms of this method. Both create a new String object from program data.
Arguments
str | For the first form, a pointer to a null-terminated ASCII-Z string. For the second form, a pointer to a data buffer containing the string data. |
len | Length of the str string. |
Returns
The new String object.
RexxSupplierObject obj; RexxArrayObject arr1, arr2; >>--obj = context->NewSupplier(arr1, arr2);------------------------------><
This method returns a Supplier object based on the supplied argument Arrays.
Arguments
Returns
The new Supplier object.
RexxObjectPtr obj; >>--obj = context->Nil();------------------------------------------------><
Returns the Rexx Nil object.
Arguments
None.
Returns
The Rexx Nil object.
RexxStringObject obj; >>--obj = context->NullString();-----------------------------------------><
This method returns a string object of zero length.
Arguments
None.
Returns
A null String object.
RexxObjectPtr obj; POINTER ptr; >>--ptr = context->ObjectToCSelf(obj);--------------------------------><
Returns a pointer to the CSELF value for another object. CSELF is a special argument type used for classes to store native pointers or structures inside an object instance. ObjectToCSelf() will search all of the object's variable scopes searching for a variable named CSELF. If a CSELF variable is located and the value is an instance of either the Pointer or the Buffer class, the corresponding POINTER value will be returned as a void * value. Objects that rely on CSELF values typically set the variable CSELF inside an INIT method for the class.
Arguments
Returns
The CSELF value for the object. Returns NULL if no CSELF value was found in the target object.
RexxObjectPtr obj; double n; logical_t flag; >>--flag = context->ObjectToDouble(obj, &n);-----------------------------><
Converts an Object to a C double value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; int32_t n; logical_t flag; >>--flag = context->ObjectToInt32(obj, &n);------------------------------><
Convert an Object into a 32-bit integer.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; int64_t n; logical_t flag; >>--flag = context->ObjectToInt64(obj, &n);------------------------------><
Convert an Object into a 64-bit integer.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; intptr_t n; logical_t flag; >>--flag = context->ObjectToIntptr(obj, &n);-----------------------------><
Convert an Object to an intptr_t value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; logical_t flag, n; >>--flag = context->ObjectToLogical(obj, &n);----------------------------><
Converts an Object to a C logical value (0 or 1).
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; RexxStringObject str; >>--str = context->ObjectToString(obj);----------------------------------><
Convert an Object to a String object.
Arguments
Returns
The String object.
RexxObjectPtr obj; size_t n; logical_t flag; >>--flag = context->ObjectToStringSize(obj, &n);-------------------------><
Convert an Object to a stringsize_t number value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; CSTRING str; >>--str = context->ObjectToStringValue(obj);-----------------------------><
Convert an Object to a C ASCII-Z string.
Arguments
Returns
The C ASCII-Z string representation of the object.
RexxObjectPtr obj; uintptr_t n; logical_t flag; >>--flag = context->ObjectToUintptr(obj, &n);----------------------------><
Convert an Object to an uintptr_t value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; uint32_t n; logical_t flag; >>--flag = context->ObjectToUnsignedInt32(obj, &n);----------------------><
Convert an Object to an uint32_t value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; uint64_t n; logical_t flag; >>--flag = context->ObjectToUnsignedInt64(obj, &n);----------------------><
Convert an Object to an uint64_t value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxObjectPtr obj; ValueDescriptor desc; logical_t flag; >>--flag = context->ObjectToValue(obj, &desc);---------------------------><
Convert a Rexx object to another type. The target type is identified by the ValueDescriptor structure, and can by any of the types that may be used as a method or routine return type. For many conversions, it may be more appropriate to use more targeted routines such as ObjectToWholeNumber(). ObjectToValue() is capable of conversions to types such as int8_t for which there are no specific conversion APIs.
Arguments
obj | The object to be converted. |
desc | A C pointer to a ValueDescriptor struct that identifies the conversion type. The converted value will be stored in the ValueDescriptor if successful. |
Returns
1 = success, 0 = conversion error. If successful, desc is updated with the converted value of the requested type.
RexxObjectPtr obj; wholenumber_t wn; logical_t flag; >>--flag = context->ObjectToWholeNumber(obj, &wn);-----------------------><
Convert an Object to a whole number value.
Arguments
Returns
1 = success, 0 = conversion error. The converted value is placed in n.
RexxPointerObject obj; POINTER p; >>--p = context->PointerValue(obj);--------------------------------------><
Return the wrappered C pointer value from a RexxPointerObject.
Arguments
Returns
The wrappered C pointer value.
CSTRING str; RexxStringObject sobj; RexxArrayObject arr; RexxObjectPtr obj; >>--context->RaiseCondition(str, sobj, add, obj);-------------------------><
Raise a condition. The raised condition is held in a pending state until the method, routine, or exit returns to the Rexx runtime. This is similar to using the RAISE instruction to raise a condition from Rexx code.
Arguments
str | The condition name. |
sobj | The optional condition description as a String object. |
add | A optional object containing additional condition information. |
obj | A Object that will be returned as a routine or method result if the raised condition is not trapped by the caller. |
Returns
Void.
size_t n; RexxObjectPtr obj; >>--context->RaiseException(n, obj);-------------------------------------><
Raise a SYNTAX condition. The raised condition is held in a pending state until the method, routine, or exit returns to the Rexx runtime. This is similar to using the RAISE instruction to raise a SYNTAX condition from Rexx code.
Arguments
n | The exception condition number. There are #defines for the recognized condition errors in the oorexxerrors.h include file. |
obj | An Array of error message substitution values. |
Returns
Void.
size_t n; >>--context->RaiseException0(n);-----------------------------------------><
Raise an exception condition with no message substitution values.
Arguments
Returns
Void.
size_t n; RexxObjectPtr obj; >>--context->RaiseException1(n, obj);------------------------------------><
Raise an exception condition with a single message substitution value.
Arguments
Returns
Void.
size_t n; RexxObjectPtr obj1, obj2; >>--context->RaiseException2(n, obj1, obj2);-----------------------------><
Raise an exception condition with two message substitution values.
Arguments
Returns
Void.
CSTRING name; logical_t success; >>--logical_t = context->RegisterLibrary(name, table);---------------------------------><
Registers an in-process library package with the global Rexx environment. The package is processed as if it is loaded from an external library, but without requiring the library packaging.
Arguments
name | The ASCII-Z path/name of the library package, in format required by the ::REQUIRES LIBRARY directive. |
table | A pointer to a RexxPackageEntry table defining the contents of the package. |
Returns
True if the library was successfully registered. False is returned if a package has already be loaded or registered with the given name.
RexxObjectPtr ref; >>--context->ReleaseGlobalReference(ref);--------------------------------><
Release access to a global object reference. This removes the global garbage collection protection from the object reference. Once released, ref should no longer be used for object operations.
Arguments
Returns
Void.
RexxObjectPtr ref; >>--context->ReleaseLocalReference(ref);---------------------------------><
Removes local context protection from an object reference. Once released, ref should no longer be used for object operations.
Arguments
Returns
Void.
RexxObjectPtr ref, obj; >>--ref = context->RequestGlobalReference(obj);--------------------------><
Requests global garbage collection protection for an object reference. The returned value may be saved in native code control blocks and used as an object reference in any API context. The obj will be protected from garbage collection until the global reference is released with ReleaseGlobalReference().
Arguments
Returns
A global reference to this object that can be saved and used in any API context.
RexxObjectPtr obj; RexxStemObject stem; >>--stem = context->ResolveStemVariable(obj);-------------------------><
Resolves a stem variable object using the same mechanism applied to RexxStemObject arguments passed to routines. If obj is a Stem object, the same Stem object will be returned. If obj is a String object, the string value is used to resolve a stem variable from the caller's variable context. The Stem object value of the referenced stem variable is returned as a result.
Arguments
Returns
The resolved Stem object.
RexxObjectPtr obj, ret; RexxArrayObject arr; >>--ret = context->SendMessage(obj, meg, arr);---------------------------><
Send a message to an Object.
Arguments
obj | The object to receive the message. |
msg | An ASCII-Z string containing the message name. This argument will be converted to upper case automatically. |
arr | The Array of message arguments. |
Returns
The returned object. If the method does not return an object then NULLOBJECT is returned. Any errors resulting from invoking the method will return a NULLOBJECT value. The CheckCondition(). can be used to check if an error occurred during the call.
RexxObjectPtr obj, ret; >>--ret = context->SendMessage0(obj, meg);-------------------------------><
Send a message to an Object. This is a short cut method when no arguments are needed by the receiving object method.
Arguments
obj | The object to receive the message. |
msg | An ASCII-Z string containing the message name. This argument will be converted to upper case automatically. |
Returns
The returned object. If the method does not return an object then NULLOBJECT is returned. Any errors resulting from invoking the method will return a NULLOBJECT value. The CheckCondition(). can be used to check if an error occurred during the call.
RexxObjectPtr obj, ret, arg1; >>--ret = context->SendMessage2(obj, meg, arg1);-------------------------><
Send a message to an Object. This is a short cut method when only one argument is needed by the receiving object method.
Arguments
obj | The object to receive the message. |
msg | An ASCII-Z string containing the message name. This argument will be converted to upper case automatically. |
arg1 | The first argument to the receiving method. |
Returns
The returned object. If the method does not return an object then NULLOBJECT is returned. Any errors resulting from invoking the method will return a NULLOBJECT value. The CheckCondition(). can be used to check if an error occurred during the call.
RexxObjectPtr obj, ret, arg1, arg2; >>--ret = context->SendMessage2(obj, meg, arg1, arg2);-------------------><
Send a message to an Object. This is a short cut method when only two arguments are needed by the receiving object method.
Arguments
obj | The object to receive the message. |
msg | An ASCII-Z string containing the message name. This argument will be converted to upper case automatically. |
arg1 | The first argument to the receiving method. |
arg2 | The second argument to the receiving method. |
Returns
The returned object. If the method does not return an object then NULLOBJECT is returned. Any errors resulting from invoking the method will return a NULLOBJECT value. The CheckCondition(). can be used to check if an error occurred during the call.
RexxObjectPtr obj; CSTRING name; >>--context->SetContextVariable(name, obj);---------------------------><
Sets the value of a Rexx variable in the current function context. Only simple and stem variables may be set using SetContextVariable(). Compound variable values may be set by retrieving the Stem object associated with a stem variable and using SetStemElement() to set the associated compound variable.
Arguments
Returns
Void.
>>--context->SetGuardOff();----------------------------------------------><
Release the guard lock for this method scope.
Arguments
None.
Returns
Void.
>>--context->SetGuardOn();-----------------------------------------------><
Obtain the guard lock for this object scope.
Arguments
None.
Returns
Void.
CSTRING str; RexxObjectPtr obj; >>--context->SetObjectVariable(str, obj);--------------------------------><
Sets an instance variable in the current method's variable scope to a new value. Only simple and stem variables may be set using this API.
Arguments
Returns
Void.
RexxStemObject sobj; RexxObjectPtr obj; size_t n; >>--context->SetStemArrayElement(sobj, n, obj);--------------------------><
Sets an element of the Stem object. If the element exists it is replaced. This method uses a numeric index as the element name.
Arguments
sobj | The target Stem object. |
n | The Stem object element number. |
obj | The object value assigned to the Stem object element. |
Returns
Void.
RexxStemObject sobj; RexxObjectPtr obj; CSTRING name; >>--context->SetStemElement(sobj, name, obj);----------------------------><
Sets an element of the Stem object. If the element exists it is replaced.
Arguments
sobj | The target Stem object. |
name | The Stem object element name. This is a fully resolve Stem tail element. |
obj | The object value assigned to the Stem object element. |
Returns
Void.
logical_t flag; >>--context->SetThreadTrace(flag);---------------------------------------><
Sets the interactive trace state for the current thread.
Arguments
Returns
Void.
logical_t flag; >>--context->SetTrace(flag);---------------------------------------------><
Sets the interactvive trace state for the interpreter instance. This will enable tracing in all active threads for the interpreter instance.
Arguments
Returns
Void.
RexxRoutineObject obj; CSTRING str; size_t len; >>--obj = context->String(str, len);------------------------------------->< >>--obj = context->String(str);------------------------------------------><
There are two forms of this method. Both create a new String object from a C string.
Arguments
Returns
A new String object.
RexxObjectPtr obj; CSTRING str; >>--str = context->StringData(obj);--------------------------------------><
Returns a read-only pointer to the String object's string data.
Arguments
Returns
A pointer to the String object's string data.
RexxObjectPtr obj; POINTER str; size_t c, len1, len2; >>--c = context->StringGet(obj, len1, str, len2);------------------------><
Copies all or part of the String object to a C string buffer.
Arguments
obj | The source String object. |
len1 | The starting position within the String. This argument is 1-based |
str | A pointer to the target buffer for the copy. Note that the buffer is NOT zero-terminated. |
len2 | The number of characters to copy. This argument should be less than or equal the size of the str buffer or a buffer overrun will result. |
Returns
The number of characters actually copied.
RexxObjectPtr obj; size_t sz; >>--sz = context->StringLength(obj);-------------------------------------><
Return the length a String object.
Arguments
Returns
The string length of the String object.
RexxObjectPtr srcobj, newobj; >>--newobj = context->StringLower(srcobj);-------------------------------><
Convert a String object to lower case, returning a new String object.
Arguments
Returns
A new String object with the string value lower cased.
RexxObjectPtr obj; logical_t flag; stringsize_t n; >>--obj = context->StringSize(&n);------------------------------------------->< >>--flag = context->StringSize(obj, &n);-------------------------------------><
There are two forms of this method. The first converts the stringsize_t value n to an Object. The second converts an Object to a stringsize_t value and returns it in n.
Arguments
n | For the first form, the stringsize_t value to be converted. For the second form, the target of the conversion. |
obj | The object to be converted. |
Returns
For the first form, an Object representation of the integer value. For the second form, 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; size_t sz; >>--obj = context->StringSizeToObject(sz);-------------------------------><
Convert a stringsize_t value to an Object.
Arguments
Returns
an Object that represents the C stringsize_t value.
RexxObjectPtr srcobj, newobj; >>--newobj = context->StringUpper(srcobj);-------------------------------><
Convert a String object upper case, returning a new String object.
Arguments
Returns
A new String object with the string value upper cased.
RexxSupplierObjectPtr sobj; logical_t flag; >>--flag = context->SupplierAvailable(sobj);-----------------------------><
Returns 1 if there is another supplier item available.
Arguments
Returns
1 = another item available, 0 = no item available.
RexxSupplierObjectPtr sobj; RexxObjectPtr obj; >>--obj = context->SupplierIndex(sobj);----------------------------------><
Return the current supplier object index value.
Arguments
Returns
The index object at the current supplier position.
RexxSupplierObjectPtr sobj; RexxObjectPtr obj; >>--obj = context->SupplierItem(sobj);-----------------------------------><
Return the current supplier item object.
Arguments
Returns
The object item at the current supplier position.
RexxSupplierObjectPtr sobj; >>--context->SupplierNext(sobj);-----------------------------------------><
Advance a Supplier object to the next enumeration position.
Arguments
Returns
Void.
>>--context->Terminate();----------------------------------------------><
Terminates the current Rexx interpreter instance. Terminate() may only be called from the thread context that originally created the interpreter instance. This call will wait for all threads to complete processing before returning.
Arguments
None.
Returns
Void.
RexxObjectPtr obj; >>--obj = context->True();-----------------------------------------------><
This method returns the Rexx .true object.
Arguments
None.
Returns
The Rexx .true object.
RexxObjectPtr obj; logical_t flag; uintptr_t n; >>--obj = context->Uintptr(&n);------------------------------------------>< >>--flag = context->Uintptr(obj, &n);------------------------------------><
There are two forms of this method. The first converts the uintptr_t value n to an Object. The second converts an Object to a uintptr_t value and returns it in n.
Arguments
n | For the first form, the uintptr_t value to be converted. For the second form, the target of the conversion. |
obj | The object to be converted. |
Returns
For the first form, an Object version of the integer. The second form returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; uintptr_t n; >>--obj = context->UintptrToObject(&n);----------------------------------><
Convert a uintptr_t value n to an Object.
Arguments
Returns
An Object that represents the uintptr_t value.
RexxObjectPtr obj; logical_t flag; uint32_t n; >>--obj = context->UnsignedInt32(n);------------------------------------->< >>--flag = context->UnsignedInt32(obj, &n);------------------------------><
There are two forms of this method. The first converts a C 32-bit unsigned integer n to an Object. The second converts an Object to a uint32_t value and returns it in n.
Arguments
n | For the first form, the uint32_t value to be converted. For the second form, the target of the conversion. |
n | The object to be converted to a uint32_t value. |
Returns
For the first form, an Object version of the integer value. For the second form, returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; uint32_t n; >>--obj = context->UnsignedInt32ToObject(n);-----------------------------><
Convert a C 32-bit unsigned integer n to an Object.
Arguments
Returns
An Object that represents the C unsigned integer.
RexxObjectPtr obj; logical_t flag; uint64_t n; >>--obj = context->UnsignedInt64(n);------------------------------------->< >>--flag = context->UnsignedInt64(obj, &n);------------------------------><
There are two forms of this method. The first converts a C 64-bit unsigned integer n to an Object. The second converts an Object to a uint64_t value and returns it in n.
Arguments
n | For the first form, the uint64_t value to be converted. For the second form, the target of the conversion. |
n | The object to be converted. |
Returns
For the first form, an Object version of the integer value. For the second form, returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; uint64_t n; >>--obj = context->UnsignedInt64ToObject(n);-----------------------------><
Convert a C 64-bit unsigned integer n to an Object.
Arguments
Returns
An Object that represents the C unsigned integer.
RexxArrayObj obj; ValueDescriptor desc[3]; >>--obj = context->ValuesToObject(desc);---------------------------------><
Converts an array of ValueDescriptor structs to an Array of objects.
Arguments
desc | A C pointer to the ValueDescriptor struct array to be converted. The end of the array is marked by a ValueDescriptor struct with all fields set to zero. |
Returns
A Array object containing the converted objects.
RexxObjectPtr obj; ValueDescriptor desc;; >>--obj = context->ValueToObject(&desc);---------------------------------><
Convert a type to an Object representation. The source type is identified by the ValueDescriptor structure, and can by any of the types that may be used as a method or routine return types. For many conversions, it may be more appropriate to use more targeted routines such as WholeNumberToObject(). ValueToObject() is capable of converting to types such as int8_t for which there are no specific conversion APIs.
Arguments
Returns
The object representing the converted value.
RexxObjectPtr obj; wholenumber_t n; logical_t flag; >>--obj = context->WholeNumber(n);--------------------------------------->< >>--flag = context->WholeNumber(obj, &n);--------------------------------><
There are two forms of this method. The first form converts a wholenumber_t value to an Object. The second form converts an Object to a wholenumber_t value and returns it in n.
Arguments
n | For the first form, the wholenumber_t value to be converted. For the second form, the target of the conversion. |
obj | The source object for the conversion. |
Returns
For the first form, an Object version of the integer value. For the second form, returns 1 = success, 0 = failure. If successful, the converted value is placed in n.
RexxObjectPtr obj; wholenumber_t n; >>--obj = context->WholeNumberToObject(n);-------------------------------><
Convert a C wholenumber_t value to an Object.
Arguments
Returns
An Object that represents the C whole number.