 The RexxSet class The RexxSet class is used to provide the numeric settings for the methods described in the section Rexx arithmetic methods. When provided, a RexxSet Object supplies the numeric settings for the operation; when null is provided then the default settings are used (digits=9, form=SCIENTIFIC). Public properties These properties supply the numeric settings and certain values they may take. After construction, the digits and form values should only be changed by using the setDigits and setForm methods. - DEFAULT_DIGITS
A constant of type int that describes the default number of digits for a numeric operation (9). - DEFAULT_FORM
A constant of type byte that describes the default exponential format for a numeric operation (SCIENTIFIC). - digits
A value of type int that describes the numeric digits to be used for a numeric operation. The Rexx arithmetic methods use this value to determine the significance of results. digits must always be greater than zero. - ENGINEERING
A constant of type byte that signifies that engineering exponential formatting should be used for a numeric operation. - form
A value of type byte that describes the exponential format to be used for a numeric operation. The Rexx arithmetic methods use this value to determine the formatting of results that require an exponent. form must be either ENGINEERING or SCIENTIFIC. - SCIENTIFIC
A constant of type byte that signifies that scientific exponential formatting should be used for a numeric operation.
Constructors These constructors are used to set the initial values of a RexxSet object. - RexxSet()
Constructs a RexxSet object which has default digits and form properties. - RexxSet(newdigits=int)
Constructs a RexxSet object which has its digits property set to newdigits and its form property set to DEFAULT_DIGITS. - RexxSet(newdigits=int, newform=byte)
Constructs a RexxSet object which has its digits property set to newdigits and its form property set to newform. - RexxSet(arg=RexxSet)
Constructs a RexxSet object which is copy of arg, which is of type netrexx.lang.RexxSet. arg must not be null.
Methods The RexxSet class has the following additional methods: - formword()
Returns a string of type netrexx.lang.Rexx that describes the form property. This will either be the string 'engineering' or the string 'scientific', corresponding to the form value ENGINEERING or SCIENTIFIC, respectively. - setDigits(newdigits=Rexx)
Sets the digits value for the RexxSet object, from newdigits, after rounding and checking as defined for the numeric instruction; newdigits must be a positive whole number with no more than nine digits. No value is returned. - setForm(newformword=Rexx)
Sets the form value for the RexxSet object, from newformword. This must equal either the string 'engineering' or the string 'scientific', corresponding to the form value ENGINEERING or SCIENTIFIC, respectively. No value is returned.
Supplement to The NetRexx Language by Mike Cowlishaw, mfc@uk.ibm.com (ISBN 0-13-806332-X, 197pp, Prentice-Hall, 1997). |