62 #define _CDECL __cdecl
67 #define RECURSIVE_ROUTINE1 \
68 "signal on any name error\n\n" \
69 "say 'Starting infinite recursison'\n" \
70 "line = 'interpret line'\n" \
74 "obj = condition('O')\n" \
75 "say 'Trapped error:' obj~code '('obj~errorText')'\n" \
78 #define RECURSIVE_ROUTINE2 \
79 "say 'Starting infinite recursison'\n" \
80 "line = 'interpret line'\n" \
102 printf(
"Failed to create interpreter, aborting.\n");
123 RexxRoutineObject obj = threadContext->NewRoutine(
"stackOverflow", buf, strlen(buf));
127 printf(
"Error creating routine object, aborting\n");
132 RexxObjectPtr result = threadContext->CallRoutine(obj, NULL);
138 interpreter->Terminate();
157 printf(
"Created interpreter instance version=%ld.%ld.%ld language level=%ld.%02ld\n\n",
158 long((ver & 0xff0000) >> 16),
long((ver & 0x00ff00) >> 8),
long(ver & 0x0000ff),
long((lang & 0xff00) >> 8),
long(lang & 0x00ff));
168 return (condition->
code - (condition->
rc * 1000));
195 size_t count = c->ArrayItems(a);
196 for (
size_t i = 1; i <= count; i++ )
201 printf(
"%s\n", c->ObjectToStringValue(o));
206 printf(
"Error %ld running %s line %ld: %s\n",
long(condition->
rc), c->CString(condition->
program),
224 if ( c->CheckCondition() )
231 c->DecodeConditionInfo(condObj, &condition);
RexxReturnCode RexxEntry RexxCreateInterpreter(RexxInstance **instance, RexxThreadContext **context, RexxOption *options)
struct _RexxArrayObject * RexxArrayObject
struct _RexxObjectPtr * RexxObjectPtr
struct _RexxRoutineObject * RexxRoutineObject
struct _RexxDirectoryObject * RexxDirectoryObject
#define RECURSIVE_ROUTINE2
wholenumber_t conditionSubCode(RexxCondition *condition)
bool checkForCondition(RexxThreadContext *c, bool clear)
void standardConditionMsg(RexxThreadContext *c, RexxDirectoryObject condObj, RexxCondition *condition)
void printInterpreterVersion(RexxInstance *)
int _CDECL main(int argc, char **argv)
#define RECURSIVE_ROUTINE1
RexxStringObject errortext