80 #define string_forwarder_cpp(method)\
81 RexxObject *RexxInteger::##method(RexxObject *operand)\
83 return (RexxObject *)this->string()->method(operand);\
166 char stringBuffer[32];
188 char stringBuffer[32];
211 char stringBuffer[32];
215 tail->
append(stringBuffer, strlen(stringBuffer));
366 if (this->
value == 0)
370 else if (this->
value != 1)
388 if (this->
value == 0)
393 else if (this->
value == 1)
409 #define integer_forward(s,m,o) ((s)->numberString()->m(o))
615 if (other->
value != 0)
642 if (other->
value != 0)
729 return this->
numberString()->
comp(other, alternativeOperator, alternativeOperatorResultPtr);
762 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
781 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
798 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
814 wholenumber_t result = this->
comp(other, OREF_BACKSLASH_EQUAL_RIGHT, &alternativeResult);
815 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
831 wholenumber_t result = this->
comp(other, OREF_GREATERTHAN_RIGHT, &alternativeResult);
832 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
848 wholenumber_t result = this->
comp(other, OREF_LESSTHAN_RIGHT, &alternativeResult);
849 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
865 wholenumber_t result = this->
comp(other, OREF_GREATERTHAN_EQUAL_RIGHT, &alternativeResult);
866 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
882 wholenumber_t result = this->
comp(other, OREF_LESSTHAN_EQUAL_RIGHT, &alternativeResult);
883 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
901 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
918 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
935 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
952 if (alternativeResult !=
OREF_NULL)
return alternativeResult;
993 bool alternativeResult = other->
messageSend(OREF_AND_RIGHT, args, 1, 0, result,
false);
1021 bool alternativeResult = other->
messageSend(OREF_OR_RIGHT, args, 1, 0, result,
false);
1047 bool alternativeResult = other->
messageSend(OREF_XOR_RIGHT, args, 1, 0, result,
false);
1085 if (this->
value > 0)
1087 else if (this->
value < 0)
1097 size_t named_argCount)
1115 maxvalue = this->
value;
1119 for (arg = 0; arg < argCount; arg++) {
1120 argument = args[arg];
1146 size_t named_argCount)
1163 minvalue = this->
value;
1167 for (arg = 0; arg < argCount; arg++) {
1168 argument = args[arg];
1385 void *RexxInteger::operator
new(
size_t size)
void reportException(wholenumber_t error)
#define integer_forward(s, m, o)
RexxInteger * new_integer(wholenumber_t v)
RexxNumberString * new_numberstringFromWholenumber(wholenumber_t n)
RexxObject *(RexxObject::* PCPPM)()
RexxString * REQUEST_STRING(RexxObject *object)
bool isPolymorphicString(RexxObject *o)
void requiredArgument(RexxObject *object, RexxString *kind, size_t position)
#define Error_Logical_value_method
#define Error_No_result_object_message
#define Error_Incorrect_method_noarg
#define Error_Overflow_zero
#define memory_mark(oref)
RexxObject * new_object(size_t s)
#define flatten_reference(oref, envel)
#define CLASS_CREATE(name, id, className)
#define memory_mark_general(oref)
#define setUpFlatten(type)
RexxString * new_string(const char *s, stringsize_t l)
static const wholenumber_t MIN_WHOLENUMBER
static const wholenumber_t MAX_WHOLENUMBER
static wholenumber_t abs(wholenumber_t n)
static const wholenumber_t validMaxWhole[]
static size_t formatWholeNumber(wholenumber_t integer, char *dest)
static const size_t DEFAULT_DIGITS
void traceIntermediate(RexxObject *v, int p)
void liveGeneral(int reason)
void append(const char *newData, size_t stringLen)
void push(RexxObject *value)
void liveGeneral(int reason)
RexxInteger * integercache[INTEGERCACHESIZE - INTEGERCACHELOW]
bool numberValue(wholenumber_t &result, size_t precision)
RexxInteger * isLessOrEqual(RexxObject *)
void setString(RexxString *string)
static RexxInteger * integerFour
RexxObject * xorOp(RexxObject *)
static void createInstance()
static RexxInteger * integerSix
RexxInteger * equal(RexxObject *)
wholenumber_t strictComp(RexxObject *, RexxString *alternativeOperator=OREF_NULL, RexxInteger **alternativeOperatorResultPtr=NULL)
RexxInteger * isLessThan(RexxObject *)
RexxInteger * strictGreaterOrEqual(RexxObject *)
RexxString * concat(RexxString *)
static RexxInteger * falseObject
static RexxInteger * integerThree
RexxInteger * isGreaterThan(RexxObject *)
static RexxInteger * integerSeven
RexxInteger * notEqual(RexxObject *)
void flatten(RexxEnvelope *)
RexxObject * power(RexxObject *)
RexxObject * getRealValue(RexxActivation *)
RexxObject * plus(RexxInteger *)
RexxObject * remainder(RexxInteger *)
RexxObject * minus(RexxInteger *)
static RexxInteger * integerZero
RexxObject * Max(RexxObject **, size_t, size_t)
bool isEqual(RexxObject *)
static RexxInteger * integerTwo
RexxObject * d2x(RexxObject *)
RexxInteger * strictGreaterThan(RexxObject *)
RexxObject * operatorNot(RexxObject *)
RexxNumberString * numberString()
RexxInteger * strictLessOrEqual(RexxObject *)
RexxInteger * strictLessThan(RexxObject *)
static RexxInteger * integerNine
RexxObject * trunc(RexxObject *)
RexxObject * Min(RexxObject **, size_t, size_t)
RexxInteger * isGreaterOrEqual(RexxObject *)
static RexxInteger * nullPointer
RexxString * concatBlank(RexxString *)
RexxObject * d2c(RexxObject *)
void liveGeneral(int reason)
virtual HashCode getHashValue()
RexxClass * classObject()
bool isInstanceOf(RexxClass *)
static RexxInteger * trueObject
RexxInteger * integerValue(size_t)
RexxObject * getValue(RexxActivation *)
RexxString * stringValue()
void copyIntoTail(RexxCompoundTail *)
RexxObject * andOp(RexxObject *)
wholenumber_t wholeNumber()
static RexxInteger * integerEight
RexxObject * multiply(RexxInteger *)
virtual wholenumber_t compareTo(RexxObject *)
RexxInteger * hasMethod(RexxString *)
RexxInteger * strictNotEqual(RexxObject *)
RexxObject * orOp(RexxObject *)
static RexxIntegerClass * classInstance
RexxObject * unknown(RexxString *, RexxArray *, RexxDirectory *)
RexxMethod * instanceMethod(RexxString *)
RexxString * makeString()
wholenumber_t comp(RexxObject *other, RexxString *alternativeOperator=OREF_NULL, RexxInteger **alternativeOperatorResultPtr=NULL)
static RexxInteger * integerMinusOne
RexxObject * format(RexxObject *, RexxObject *, RexxObject *, RexxObject *)
static RexxInteger * integerOne
RexxObject * evaluate(RexxActivation *, RexxExpressionStack *)
RexxInteger * strictEqual(RexxObject *)
RexxObject * integerDivide(RexxInteger *)
static RexxInteger * integerFive
bool doubleValue(double &result)
RexxSupplier * instanceMethods(RexxClass *)
bool unsignedNumberValue(stringsize_t &result, size_t precision)
RexxObject * divide(RexxInteger *)
virtual bool logicalValue(logical_t &)
RexxString * primitiveMakeString()
static PCPPM operatorMethods[]
bool isSubClassOrEnhanced()
void setHasNoReferences()
bool isSameType(RexxInternalObject *o)
wholenumber_t comp(RexxObject *, RexxString *alternativeOperator=OREF_NULL, RexxInteger **alternativeOperatorResultPtr=NULL)
RexxNumberString * Max(RexxObject **, size_t, size_t)
RexxString * formatRexx(RexxObject *, RexxObject *, RexxObject *, RexxObject *)
RexxNumberString * Min(RexxObject **, size_t, size_t)
RexxString * d2xD2c(RexxObject *, bool)
RexxObject * trunc(RexxObject *)
virtual RexxInteger * hasMethod(RexxString *msg)
RexxSupplier * instanceMethods(RexxClass *)
void sendMessage(RexxString *, RexxArray *, RexxDirectory *, ProtectedObject &)
RexxMethod * instanceMethod(RexxString *)
bool messageSend(RexxString *, RexxObject **, size_t, size_t, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)
bool isInstanceOf(RexxClass *)
RexxString * concatRexx(RexxObject *)
const char * getStringData()
RexxString * concatBlank(RexxObject *)
RexxNumberString * numberString()
bool isEqual(RexxObject *)
virtual HashCode getHashValue()
RexxString * concat(RexxString *)
RexxString * concatWith(RexxString *, char)
wholenumber_t compareTo(RexxObject *)
wholenumber_t strictComp(RexxObject *, RexxString *alternativeOperator=NULL, RexxInteger **alternativeOperatorResultPtr=NULL)