Rexx Interface Methods Listing

This section describes each available method and its associated context.

Array

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ArrayAppend

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
RexxObjectPtr obj;
size_t n;

>>--n = context->ArrayAppend(arr, obj);----------------------------------><

Append an Object to the end of an Array.

Arguments

arr

The target Array object.

obj

The object to be appended.

Returns

The index of the appended object.

ArrayAppendString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ArrayAt

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
RexxObjectPtr obj;
size_t idx;

>>--obj = context->ArrayAt(arr, idx);------------------------------------><

Retrieve an object from a specified Array index.

Arguments

arr

The source Array object.

idx

The index of the required object. This argument is 1-based.

Returns

The object at the specified index. Returns NULLOBJECT if there is no value at the specified index.

ArrayDimension

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
size_t sz;

>>--sz = context->ArrayDimension(arr);-----------------------------------><

Returns number of dimensions of an Array.

Arguments

arr

The target Array object.

Returns

The number of Array dimensions.

ArrayItems

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
size_t sz;

>>--sz = context->ArrayItems(arr);---------------------------------------><

Returns number of elements in an Array.

Arguments

arr

The source Array object.

Returns

The number of Array elements.

ArrayOfFour

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ArrayOfThree

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ArrayOfTwo

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
RexxObjectPtr obj1, obj2;

>>--arr = context->ArrayOfTwo(obj1, obj2);-------------------------------><

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.

Returns

The new Array object.

ArrayOfOne

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
RexxObjectPtr obj;

>>--arr = context->ArrayOfOne(obj);--------------------------------------><

Create a new one-dimension Array with the specified object.

Arguments

obj

The object to be added.

Returns

The new Array object.

ArrayPut

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ArraySize

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject arr;
size_t sz;

>>--sz = context->ArraySize(arr);----------------------------------------><

Returns the size of an Array.

Arguments

arr

The source Array object.

Returns

The Array size.

AttachThread

ContextAvailable
ThreadNo
MethodNo
FunctionNo
ExitNo
InterpreterYes

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.

BufferData

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxBufferObject obj;
POINTER str;

>>--str = context->BufferData(obj);--------------------------------------------><

Returns a pointer to a Buffer object's data area.

Arguments

obj

The source Buffer object.

Returns

The C pointer to the Buffer object's data area.

BufferLength

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxBufferObject obj;
size_t sz;

>>--sz = context->BufferLength(obj);-------------------------------------><

Return the length of a Buffer object's data area.

Arguments

obj

The source Buffer object.

Returns

The length of the Buffer object's data area.

BufferStringData

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxBufferStringObject obj;
POINTER str;

>>--str = context->BufferStringData(obj);--------------------------------------><

Returns a pointer to a RexxBufferString object's data area.

Arguments

obj

The source object.

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.

BufferStringLength

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxBufferStringObject obj;
size_t sz;

>>--sz = context->BufferStringLength(obj);-------------------------------><

Return the length of a RexxBufferStringObject instance.

Arguments

obj

The source RexxBufferStringObject.

Returns

The length of the RexxBufferStringObject.

CallProgram

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

CSTRING name;
RexxObjectPtr ret;
RexxArrayObject arr;

>>--ret = context->CallProgram(name, arr);----------------------------><

Returns the result object of the routine.

Arguments

name

The ASCII-Z path/name of the Rexx program to call.

arr

An Array of object program 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.

CallRoutine

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj, ret;
RexxArrayObject arr;

>>--ret = context->CallRoutine(obj, arr);-----------------------------><

Returns the result object of the routine.

Arguments

obj

The routine object to call.

arr

An Array of routine argument objects.

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.

CheckCondition

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ClearCondition

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

>>--context->ClearCondition();-------------------------------------------><

Clears any pending condition status.

Arguments

None.

Returns

Void.

CString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The source object for the conversion.

str

The source C ASCII-Z string for the conversion.

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..

DecodeConditionInfo

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

DetachThread

ContextAvailable
ThreadYes
MethodNo
FunctionNo
ExitNo
InterpreterNos

>>--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.

DirectoryAt

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dirobj;
RexxObjectPtr obj;
CSTRING str;

>>--obj = context->DirectoryAt(dirobj, str);-----------------------------><

Return the object at the specified index.

Arguments

dirobj

The source Directory object.

str

The index into the Directory object.

Returns

The object at the specified index. Returns NULLOBJECT if the given index does not exist.

DirectoryPut

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

DirectoryRemove

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dirobj;
RexxObjectPtr obj;
CSTRING str;

>>--obj = context->DirectoryRemove(dirobj, str);-------------------------><

Removes and returns the object at the specified Directory index.

Arguments

dirobj

The source Directory object.

str

The ASCII-Z index into the Directory object.

Returns

The object removed at the specified index. Returns NULLOBJECT if the index did not exist in the target Directory.

Double

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.<

DoubleToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
double n;

>>--obj = context->DoubleToObject(n);------------------------------------><

Converts C double value to an Object.

Arguments

n

The double value to be converted.

Returns

An Object representation of the double value.

DoubleToObjectWithPrecision

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
size_t p;
double n;

>>--obj = context->DoubleToObject(n, p);---------------------------------><

Converts C double value to an Object with a specific precision.

Arguments

n

The double value to be converted.

p

The precision to be used for the conversion.

Returns

An Object representation of the double value.

DropContextVariable

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitYes
InterpreterNo

CSTRING name;

>>--context->DropContextVariable(name);-------------------------------><

Drops a Rexx variable in the current routine's caller variable context.

Arguments

name

The name of the Rexx variable.

Returns

Void.

DropObjectVariable

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

CSTRING str;

>>--context->DropObjectVariable(str);------------------------------------><

Drops an instance variable in the current method's scope.

Arguments

str

The name of the object variable.

Returns

Void.

DropStemArrayElement

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxStemObject sobj;
size_t n;

>>--context->DropStemArrayElement(sobj, n);------------------------------><

Drops an element of the Stem object.

Arguments

sobj

The target Stem object.

n

The Stem object element number.

Returns

Void.

DropStemElement

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxStemObject sobj;
CSTRING name;

>>--context->DropStemElement(sobj, name);--------------------------------><

Drops an element of the Stem object.

Arguments

sobj

The target Stem object.

name

The Stem object element name.

Returns

Void.

False

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;

>>--obj = context->False();----------------------------------------------><

This method returns the Rexx .false ( 0 ) object.

Arguments

None.

Returns

The Rexx .false object.

FindClass

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxClassObject class;
CSTRING name;

>>--class = context->FindClass(name);---------------------------------><

Locates a Class object in the current thread context.

Arguments

name

An ASCII-Z string containing the name of the class.

Returns

The located Class object. Returns NULLOBJECT if the class is not found.

FindContextClass

ContextAvailable
ThreadNo
MethodYes
FunctionYes
ExitNo
InterpreterNo

CSTRING name;
RexxClassObject obj;

>>--obj = context->FindContextClass(name);-------------------------------><

Locate a Class object in the current Method or Routine Package context.

Arguments

name

The class name to be located.

Returns

The located Class object. Returns NULLOBJECT if the class is not found.

FindPackageClass

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

FinishBufferString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The working RexxBufferStringObject.

len

The final length of the constructed string.

Returns

The finalized Rexx string object.

ForwardMessage

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

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.

GetAllContextVariables

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitYes
InterpreterNo

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.

GetAllStemElements

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

sobj

The source Stem object.

Returns

The Directory object containing the Stem variable values.

GetApplicationData

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

>>--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.

GetArgument

ContextAvailable
ThreadNo
MethodYes
FunctionYes
ExitNo
InterpreterNo

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

n

The argument number (1-based).

Returns

The object corresponding to the given argument position. Returns NULLOBJECT if the argument was not specified.

GetArguments

ContextAvailable
ThreadNo
MethodYes
FunctionYes
ExitNo
InterpreterNo

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.

GetCallerContext

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitYes
InterpreterNo

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.

GetConditionInfo

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

GetContextDigits

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

stringsize_t sz;

>>--sz = context->GetContextDigits();---------------------------------><

Get the routine caller's current NUMERIC DIGITS setting.

Arguments

None.

Returns

The current NUMERIC DIGITS setting.

GetContextForm

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

stringsize_t sz;

>>--sz = context->GetContextForm();-----------------------------------><

Get the routine caller's current NUMERIC FORM setting.

Arguments

None.

Returns

The current NUMERIC FORM setting.

GetContextFuzz

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

stringsize_t sz;

>>--sz = context->GetContextFuzz();-----------------------------------><

Get the routine caller's current NUMERIC FUZZ setting.

Arguments

None.

Returns

The current NUMERIC FUZZ setting.

GetContextVariable

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitYes
InterpreterNo

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

name

The name of the Rexx variable.

Returns

The value of the named variable. Returns NULLOBJECT if the variable has not been assigned a value.

GetGlobalEnvironment

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dir;

>>--dir = context->GetGlobalEnvironment();----------------------------><

Returns a reference to the .environment Directory.

Arguments

None.

Returns

A RexxDirectoryObject pointer to the .environment Directory.

GetLocalEnvironment

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dir;

>>--dir = context->GetLocalEnvironment();-----------------------------><

Returns a reference to the interpreter instance .local Directory.

Arguments

None.

Returns

A RexxDirectoryObject pointer to the .local Directory.

GetMessageName

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

CSTRING str;

>>--str = context->GetMessageName(obj);-------------------------------><

Returns the message name used to invoke the current method.

Arguments

None.

Returns

The current method message name.

GetMethod

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

RexxMethodObject obj;

>>--obj = context->GetMethod();---------------------------------------><

Returns the Method object for the currently executing method.

Arguments

None.

Returns

The current Method object.

GetMethodPackage

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxMethodObject obj;
RexxPackageObject pkg;

>>--pkg = context->GetMethodPackage(obj);-----------------------------><

Returns the Package object associated with the specified Method instance.

Arguments

obj

The source Method object..

Returns

The Method's defining Package object.

GetObjectVariable

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

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

str

The name of the object variable.

Returns

The object assigned to the named object variable. Returns NULLOBJECT if the variable has not been assigned a value.

GetPackageClasses

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dir;
RexxPackageObject pkg;

>>--dir = context->GetPackageClasses(pkg);----------------------------><

Returns a Directory object containing the Package public and private classes, indexed by class name.

Arguments

obj

The package object to query.

Returns

A Directory object containing the package classes.

GetPackageMethods

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The package routine object to query.

Returns

A Directory object containing the Package's unattached methods.

GetPackagePublicClasses

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dir;
RexxPackageObject pkg;

>>--dir = context->GetPackagePublicClasses(pkg);----------------------><

Returns a Directory object containing the Package public classes, indexed by class name.

Arguments

obj

The package object to query.

Returns

A Directory object containing the public classes.

GetPackagePublicRoutines

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dir;
RexxPackageObject pkg;

>>--dir = context->GetPackagePublicRoutines(pkg);---------------------><

Returns a Directory object containing the Package public routines, indexed by routine name.

Arguments

obj

The package object to query.

Returns

A Directory object containing the public routines.

GetPackageRoutines

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject dir;
RexxPackageObject pkg;

>>--dir = context->GetPackageRoutines(pkg);---------------------------><

Returns a Directory object containing the Package public and private routines, indexed by routine name.

Arguments

obj

The package routine object to query.

Returns

A Directory object containing the routines.

GetRoutine

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

RexxRoutineObject obj;

>>--obj = context->GetRoutine();--------------------------------------><

Returns current Routine object.

Arguments

None

Returns

The current Routine object.

GetRoutineName

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

CSTRING name;

>>--name = context->GetRoutineName();---------------------------------><

Returns the name of the current routine.

Arguments

None

Returns

A pointer ASCII-Z routine name.

GetRoutinePackage

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxRoutineObject obj;
RexxPackageObject pkg;

>>--pkg = context->GetRoutinePackage(obj);----------------------------><

Returns Routine object's associated Package object.

Arguments

obj

The routine object to query.

Returns

The Package object instance.

GetScope

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

RexxObjectPtr obj;

>>--obj = context->GetScope();----------------------------------------><

Return the current active method's scope.

Arguments

None.

Returns

The current Method's scope.

GetSelf

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

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.

GetStemArrayElement

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

GetStemElement

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

GetStemValue

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxStemObject sobj;
RexxObjectPtr obj;
CSTRING name;

>>--obj = context->GetStemValue(sobj);-----------------------------------><

Retrieves the base name value of a Stem object.

Arguments

sobj

The source Stem object.

Returns

The Stem object's default base value.

GetSuper

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

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.

Halt

ContextAvailable
ThreadNo
MethodNo
FunctionNo
ExitNo
InterpreterYes

>>--context->Halt();-----------------------------------------------------><

Raise a HALT condition on all threads associated with the interpreter instance.

Arguments

None.

Returns

Void.

HaltThread

ContextAvailable
ThreadYes
MethodNo
FunctionNo
ExitNo
InterpreterNos

>>--context->HaltThread();----------------------------------------------><

Raises a HALT condition on the thread corresponding to the current context pointer.

Arguments

None

Returns

Void.

HasMethod

ContextAvailable
ThreadYes
MethodTes
FunctionTes
ExitYes
InterpreterNo

logical_t flag;
RexxObjectPtr obj;
CSTRING name;

>>--flag = context->HasMethod(obj, name);-------------------------------><

Tests if an object supports the specified method name.

Arguments

obj

The target object.

name

An ASCII-Z method name.

Returns

1 = the method exists, 0 = the method does not exist.

InvalidRoutine

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

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.

Int32

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

Int32ToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
int32_t n;

>>--obj = context->Int32ToObject(n);-------------------------------------><

Convert a C 32-bit integer n to an Object.

Arguments

n

The integer to be converted.

Returns

An Object representation of the integer value.

Int64

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

Int64ToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
int64_t n;

>>--obj = context->Int64ToObject(n);-------------------------------------><

Convert the C 64-bit integer n to an Object.

Arguments

n

The integer to be converted.

Returns

An Object representing the integer value.

InterpreterVersion

ContextAvailable
ThreadYes
MethodTes
FunctionTes
ExitYes
InterpreterYes

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.

Intptr

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

IntptrToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
intptr_t n;

>>--obj = context->IntptrToObject(&n);-----------------------------------><

Convert the C signed integer n to an Object.

Arguments

n

The signed integer to be converted.

Returns

An Object representing the integer value.

IsArray

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is an Array object, 0 = not an Array object.

IsBuffer

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a Buffer object, 0 = not a Buffer object.

IsDirectory

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a Directory object, 0 = not a Directory object.

IsInstanceOf

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
RexxClassObj class;
logical_t flag;

>>--flag = context->IsInstanceOf(obj, class);---------------------------><

Tests if an Object is an instance of the specified class.

Arguments

obj

The Object to be tested.

class

The Class object for the instance test.

Returns

1 = is an instance, 0 = not an instance.

IsMethod

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a Method object, 0 = not a Method object.

IsOfType

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

IsPointer

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a Pointer object, 0 = not a Pointer object.

IsRoutine

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a Routine object, 0 = not a Routine object.

IsStem

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a Stem object, 0 = not a Stem object.

IsString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The object to be tested.

Returns

1 = is a String object, 0 = not a String object.

LanguageLevel

ContextAvailable
ThreadYes
MethodTes
FunctionYes
ExitYes
InterpreterYes

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.

LoadLibrary

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

LoadPackage

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

CSTRING name;
RexxPackageObject pkg;

>>--pkg = context->LoadPackage(name);---------------------------------><

Returns the Package object loaded from the specified file path/name.

Arguments

name

The ASCII-Z path/name of the Rexx package source file.

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().

LoadPackageFromData

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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().

Logical

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

LogicalToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
logical_t flag, n;

>>--obj = context->LogicalToObject(n);-----------------------------------><

Converts a C logical value to an Object.

Arguments

n

The logical_t value to be converted..

Returns

Either the .false or .true object is returned.

NewArray

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxArrayObject obj;
size_t len;

>>--obj = context->NewArray(d);------------------------------------------><

Create an Array object of the specified size.

Arguments

d

The size of the Array.

Returns

The new Array object.

NewBuffer

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxBufferObject obj;
size_t len;

>>--obj = context->NewBuffer(len);---------------------------------------><

Create a Buffer object with a specific data size.

Arguments

len

The maximum length of the buffer.

Returns

The new Buffer object.

NewBufferString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

len

The maximum length of the final String object.

Returns

A new RexxBufferString value.

NewDirectory

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxDirectoryObject obj;

>>--obj = context->NewDirectory();---------------------------------------><

Create a Directory object.

Arguments

None

Returns

The new Directory object.

NewMethod

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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().

NewPointer

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxPointerObject obj;
POINTER p;

>>--obj = context->NewPointer(p);----------------------------------------><

Create a new Pointer object from a C pointer.

Arguments

p

The source C pointer.

Returns

The created Pointer object.

NewRoutine

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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().

NewStem

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxStemObject obj;
CSTRING str;

>>--obj = context->NewStem(str);-----------------------------------------><

Create an new Stem object with the specified base name.

Arguments

str

The base name for the new Stem object.

Returns

The new Stem object.

NewString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

NewSupplier

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxSupplierObject obj;
RexxArrayObject arr1, arr2;

>>--obj = context->NewSupplier(arr1, arr2);------------------------------><

This method returns a Supplier object based on the supplied argument Arrays.

Arguments

arr1

The Array of supplier items.

arr2

The Array of supplier item indexes.

Returns

The new Supplier object.

Nil

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;

>>--obj = context->Nil();------------------------------------------------><

Returns the Rexx Nil object.

Arguments

None.

Returns

The Rexx Nil object.

NullString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxStringObject obj;

>>--obj = context->NullString();-----------------------------------------><

This method returns a string object of zero length.

Arguments

None.

Returns

A null String object.

ObjectToCSelf

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The source object.

Returns

The CSELF value for the object. Returns NULL if no CSELF value was found in the target object.

ObjectToDouble

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
double n;
logical_t flag;

>>--flag = context->ObjectToDouble(obj, &n);-----------------------------><

Converts an Object to a C double value.

Arguments

obj

The source object for the conversion.

n

A returned converted value.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToInt32

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
int32_t n;
logical_t flag;

>>--flag = context->ObjectToInt32(obj, &n);------------------------------><

Convert an Object into a 32-bit integer.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToInt64

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
int64_t n;
logical_t flag;

>>--flag = context->ObjectToInt64(obj, &n);------------------------------><

Convert an Object into a 64-bit integer.

Arguments

obj

The object to be converted.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToIntptr

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
intptr_t n;
logical_t flag;

>>--flag = context->ObjectToIntptr(obj, &n);-----------------------------><

Convert an Object to an intptr_t value.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToLogical

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
logical_t flag, n;

>>--flag = context->ObjectToLogical(obj, &n);----------------------------><

Converts an Object to a C logical value (0 or 1).

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToString

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
RexxStringObject str;

>>--str = context->ObjectToString(obj);----------------------------------><

Convert an Object to a String object.

Arguments

obj

The source object for the conversion.

Returns

The String object.

ObjectToStringSize

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
size_t n;
logical_t flag;

>>--flag = context->ObjectToStringSize(obj, &n);-------------------------><

Convert an Object to a stringsize_t number value.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToStringValue

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
CSTRING str;

>>--str = context->ObjectToStringValue(obj);-----------------------------><

Convert an Object to a C ASCII-Z string.

Arguments

obj

The source object for the conversion.

Returns

The C ASCII-Z string representation of the object.

ObjectToUintptr

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
uintptr_t n;
logical_t flag;

>>--flag = context->ObjectToUintptr(obj, &n);----------------------------><

Convert an Object to an uintptr_t value.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToUnsignedInt32

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
uint32_t n;
logical_t flag;

>>--flag = context->ObjectToUnsignedInt32(obj, &n);----------------------><

Convert an Object to an uint32_t value.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToUnsignedInt64

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
uint64_t n;
logical_t flag;

>>--flag = context->ObjectToUnsignedInt64(obj, &n);----------------------><

Convert an Object to an uint64_t value.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

ObjectToValue

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ObjectToWholeNumber

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
wholenumber_t wn;
logical_t flag;

>>--flag = context->ObjectToWholeNumber(obj, &wn);-----------------------><

Convert an Object to a whole number value.

Arguments

obj

The object to convert.

n

The conversion result.

Returns

1 = success, 0 = conversion error. The converted value is placed in n.

PointerValue

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxPointerObject obj;
POINTER p;

>>--p = context->PointerValue(obj);--------------------------------------><

Return the wrappered C pointer value from a RexxPointerObject.

Arguments

obj

The source RexxPointerObject.

Returns

The wrappered C pointer value.

RaiseCondition

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

RaiseException

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

RaiseException0

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

size_t n;

>>--context->RaiseException0(n);-----------------------------------------><

Raise an exception condition with no message substitution values.

Arguments

n

The exception condition number.

Returns

Void.

RaiseException1

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

size_t n;
RexxObjectPtr obj;

>>--context->RaiseException1(n, obj);------------------------------------><

Raise an exception condition with a single message substitution value.

Arguments

n

The exception condition number.

obj

A substitution value for the condition error message.

Returns

Void.

RaiseException2

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

size_t n;
RexxObjectPtr obj1, obj2;

>>--context->RaiseException2(n, obj1, obj2);-----------------------------><

Raise an exception condition with two message substitution values.

Arguments

n

The exception condition number.

obj1

The first substitution value.

obj2

The second substitution value.

Returns

Void.

RegisterLibrary

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ReleaseGlobalReference

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

ref

A global Rexx object reference.

Returns

Void.

ReleaseLocalReference

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

ref

The local Rexx object reference.

Returns

Void.

RequestGlobalReference

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

obj

The Rexx object to be protected.

Returns

A global reference to this object that can be saved and used in any API context.

ResolveStemVariable

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitNo
InterpreterNo

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

obj

The source object to be resolved to a Stem object.

Returns

The resolved Stem object.

SendMessage

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

SendMessage0

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

SendMessage1

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

SendMessage2

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

SetContextVariable

ContextAvailable
ThreadNo
MethodNo
FunctionYes
ExitYes
InterpreterNo

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

name

The name of the Rexx variable.

obj

The object to assign to the variable.

Returns

Void.

SetGuardOff

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

>>--context->SetGuardOff();----------------------------------------------><

Release the guard lock for this method scope.

Arguments

None.

Returns

Void.

SetGuardOn

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

>>--context->SetGuardOn();-----------------------------------------------><

Obtain the guard lock for this object scope.

Arguments

None.

Returns

Void.

SetObjectVariable

ContextAvailable
ThreadNo
MethodYes
FunctionNo
ExitNo
InterpreterNo

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

str

The name of the object variable.

obj

The object to assign to the object variable.

Returns

Void.

SetStemArrayElement

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

SetStemElement

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

SetThreadTrace

ContextAvailable
ThreadYes
MethodNo
FunctionNo
ExitNo
InterpreterNo

logical_t flag;

>>--context->SetThreadTrace(flag);---------------------------------------><

Sets the interactive trace state for the current thread.

Arguments

flag

New state for interactive trace.

Returns

Void.

SetTrace

ContextAvailable
ThreadNo
MethodNo
FunctionNo
ExitNo
InterpreterYes

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

flag

The new trace state.

Returns

Void.

String

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

str

The ASCII-Z string to be converted.

len

Length of the str string.

Returns

A new String object.

StringData

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
CSTRING str;

>>--str = context->StringData(obj);--------------------------------------><

Returns a read-only pointer to the String object's string data.

Arguments

obj

The source String object for the data.

Returns

A pointer to the String object's string data.

StringGet

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

StringLength

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
size_t sz;

>>--sz = context->StringLength(obj);-------------------------------------><

Return the length a String object.

Arguments

obj

The source String object.

Returns

The string length of the String object.

StringLower

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr srcobj, newobj;

>>--newobj = context->StringLower(srcobj);-------------------------------><

Convert a String object to lower case, returning a new String object.

Arguments

srcobj

The source String object to be converted to lower case.

Returns

A new String object with the string value lower cased.

StringSize

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

StringSizeToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
size_t sz;

>>--obj = context->StringSizeToObject(sz);-------------------------------><

Convert a stringsize_t value to an Object.

Arguments

sz

The stringsize_t value to be converted.

Returns

an Object that represents the C stringsize_t value.

StringUpper

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr srcobj, newobj;

>>--newobj = context->StringUpper(srcobj);-------------------------------><

Convert a String object upper case, returning a new String object.

Arguments

srcobj

The source String object.

Returns

A new String object with the string value upper cased.

SupplierAvailable

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxSupplierObjectPtr sobj;
logical_t flag;

>>--flag = context->SupplierAvailable(sobj);-----------------------------><

Returns 1 if there is another supplier item available.

Arguments

sobj

The source supplier object.

Returns

1 = another item available, 0 = no item available.

SupplierIndex

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxSupplierObjectPtr sobj;
RexxObjectPtr obj;

>>--obj = context->SupplierIndex(sobj);----------------------------------><

Return the current supplier object index value.

Arguments

sobj

The source supplier object.

Returns

The index object at the current supplier position.

SupplierItem

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxSupplierObjectPtr sobj;
RexxObjectPtr obj;

>>--obj = context->SupplierItem(sobj);-----------------------------------><

Return the current supplier item object.

Arguments

sobj

The source supplier object.

Returns

The object item at the current supplier position.

SupplierNext

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxSupplierObjectPtr sobj;

>>--context->SupplierNext(sobj);-----------------------------------------><

Advance a Supplier object to the next enumeration position.

Arguments

sobj

The source supplier object.

Returns

Void.

Terminate

ContextAvailable
ThreadNo
MethodNo
FunctionNo
ExitNo
InterpreterYes

>>--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.

True

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;

>>--obj = context->True();-----------------------------------------------><

This method returns the Rexx .true object.

Arguments

None.

Returns

The Rexx .true object.

Uintptr

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

UintptrToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
uintptr_t n;

>>--obj = context->UintptrToObject(&n);----------------------------------><

Convert a uintptr_t value n to an Object.

Arguments

n

The uintptr_t value to be converted.

Returns

An Object that represents the uintptr_t value.

UnsignedInt32

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

UnsignedInt32ToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
uint32_t n;

>>--obj = context->UnsignedInt32ToObject(n);-----------------------------><

Convert a C 32-bit unsigned integer n to an Object.

Arguments

n

The uint32_t value to be converted.

Returns

An Object that represents the C unsigned integer.

UnsignedInt64

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

UnsignedInt64ToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
uint64_t n;

>>--obj = context->UnsignedInt64ToObject(n);-----------------------------><

Convert a C 64-bit unsigned integer n to an Object.

Arguments

n

The uint64_t value to be converted.

Returns

An Object that represents the C unsigned integer.

ValuesToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

ValueToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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

desc

A C pointer to the ValueDescriptor struct describing the source value.

Returns

The object representing the converted value.

WholeNumber

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

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.

WholeNumberToObject

ContextAvailable
ThreadYes
MethodYes
FunctionYes
ExitYes
InterpreterNo

RexxObjectPtr obj;
wholenumber_t n;

>>--obj = context->WholeNumberToObject(n);-------------------------------><

Convert a C wholenumber_t value to an Object.

Arguments

n

The C whole number to be converted.

Returns

An Object that represents the C whole number.