::OPTIONS

The ::OPTIONS directive defines default values for numeric and trace settings for all Rexx code contained within a package.

>>-::OPTIONS--+---------------+--+-----------+--+-----------+---->
              +-DIGITS-digits-+  +-FORM-form-+  +-FUZZ-fuzz-+

 >------------+-------------+------------------------------------><
              +-TRACE-trace-+

Any of the options may be specified on a single ::OPTIONS directive in any order. If an option is specified more than once, the last specified value will the be one used. If more than one ::OPTIONS directive appears in a source file, the options are processed in the order they appear and the effect is accumulative. If a given option type is specified on more than directive, the last specified will be the value used.

The specified options will override the normal default settings for all Rexx code contained in the source file. For example,

::OPTIONS DIGITS 20

would direct that all method and routine code defined in this source package execute with an initial NUMERIC DIGITS setting of 20 digits. The ::OPTIONS directive controls only the initial setting. A method or routine may change the current setting with the NUMERIC DIGITS instruction as normal. The values specified with ::OPTIONS only apply to code that appears in the same source file. It does not apply to code in other source files that may reference or use this code. For example, a subclass of a class defined in this source package will not inherit the ::OPTIONS settings if the subclass code is located in a different source package.

The following options may be specified on an ::OPTIONS directive:

DIGITS

controls the precision to which arithmetic operations and built-in functions are evaluated. The value digits must be a symbol or string that is a valid positive whole number value and must be larger than the current FUZZ ::OPTIONS setting. The package value can be retrieved using the Package class digits method.

There is no limit to the value for DIGITS (except the amount of storage available), but high precisions are likely to require a great amount of processing time. It is recommended that you use the default value whenever possible.

FORM

controls the form of exponential notation for the result of arithmetic operations and built-in functions. This can be either SCIENTIFIC (in which case only one, nonzero digit appears before the decimal point) or ENGINEERING (in which case the power of 10 is always a multiple of 3). The default is SCIENTIFIC. The subkeywords SCIENTIFIC or ENGINEERING must be specified as symbols. The package value can be retrieved using the Package class form method.

FUZZ

controls how many digits, at full precision, are ignored during a numeric comparison operation. (See Numeric Comparisons.) The value fuzz must be a symbol or string that is a valid positive whole number value and must be smaller than the current DIGIT ::OPTIONS setting. The package value can be retrieved using the Package class fuzz method.

NUMERIC FUZZ temporarily reduces the value of NUMERIC DIGITS by the NUMERIC FUZZ value during every numeric comparison. The numbers are subtracted under a precision of DIGITS minus FUZZ digits during the comparison and are then compared with 0.

TRACE

controls the tracing action (that is, how much is displayed to the user) during the processing of all Rexx code contained in the package. Tracing describes some or all of the clauses in a program, producing descriptions of clauses as they are processed. TRACE is mainly used for debugging. The value trace must be one of the Trace Alphabetic Character (Word) Options valid for the Trace instruction. The package value can be retrieved using the Package class trace method.