Pragmatic directives: Difference between revisions

Content added Content deleted
m (→‎trace: changed the wording.)
m (→‎{{header|REXX}}: changed wording.)
Line 380: Line 380:


===numeric digits===
===numeric digits===
The   '''NUMERIC DIGITS nnn'''   statement is used to specify
The   '''NUMERIC DIGITS nnn'''   statement is used to specify to the REXX interpreter how many
<br>(significant) decimal digits are to be used in calculating and storing numbers.
to the REXX interpreter how many
<br>(significant) decimal digits
are to be used in calculating and storing numbers.


'''nnn''' &nbsp; can be an expression that evaluates to a
'''nnn''' &nbsp; can be an expression that evaluates to a positive integer.
positive integer.


If &nbsp; '''nnn''' &nbsp; is omitted, it defaults to &nbsp; '''9'''.
If &nbsp; '''nnn''' &nbsp; is omitted, it defaults to &nbsp; '''9'''.


If no &nbsp; '''numeric digits''' &nbsp; statement is used, &nbsp; the
If no &nbsp; '''numeric digits''' &nbsp; statement is used, &nbsp; the default is &nbsp; '''9'''.
default for REXX programs is &nbsp; '''9'''.


It must be greater than the
It must be greater than the (current) &nbsp; '''NUMERIC FUZZ''' &nbsp; setting.
(current) &nbsp; '''NUMERIC FUZZ''' &nbsp; setting.


===numeric fuzz===
===numeric fuzz===
The &nbsp; '''NUMERIC FUZZ nnn''' &nbsp; statement is used to
The &nbsp; '''NUMERIC FUZZ nnn''' &nbsp; statement is used to specify to the REXX interpreter how many
<br>decimal digits &nbsp; (at full precision) &nbsp; will be ignored while performing arithmetic
specify to the REXX interpreter how many
<br>comparisons.
<br>decimal digits &nbsp; (at
full precision) &nbsp; will be ignored while performing an arithmetic
<br>comparison.


'''nnn''' &nbsp; can be an expression that evaluates to a
'''nnn''' &nbsp; can be an expression that evaluates to a non-negative integer.
non-negative integer.


If &nbsp; '''nnn''' &nbsp; is omitted, it defaults to &nbsp; '''0'''.
If &nbsp; '''nnn''' &nbsp; is omitted, it defaults to &nbsp; '''0'''.


If no &nbsp; '''numeric fuzz''' &nbsp; statement is used, &nbsp; the
If no &nbsp; '''numeric fuzz''' &nbsp; statement is used, &nbsp; the default for REXX programs is &nbsp; '''0'''.
default for REXX programs is &nbsp; '''0'''.


It must be less than the
It must be less than the (current) &nbsp; '''NUMERIC DIGITS''' &nbsp; setting.
(current) &nbsp; '''NUMERIC DIGITS''' &nbsp; setting.


The result of using a positive value for &nbsp; '''FUZZ''' &nbsp; is
The result of using a positive value for &nbsp; '''FUZZ''' &nbsp; is that the REXX interpreter (temporarily) reduces
<br>the number of &nbsp; '''NUMERIC DIGITS''' &nbsp; by the &nbsp; '''FUZZ''' &nbsp; value before an arithmetic comparison.
that the REXX interpreter (temporarily) reduces
<br>the number of &nbsp; '''NUMERIC DIGITS''' &nbsp; by
the &nbsp; '''FUZZ''' &nbsp; value before an arithmetic comparison.


This means that arithmetic comparisons are performed with the precision of
This means that arithmetic comparisons are performed with the precision of
Line 425: Line 413:


===numeric form===
===numeric form===
The &nbsp; '''NUMERIC FORM''' &nbsp; statement is used to
The &nbsp; '''NUMERIC FORM''' &nbsp; statement is used to cause the REXX interpreter to use a specific form of
<br>exponential format &nbsp; if &nbsp; the result of an arithmetic operation requires the use of exponential notation
cause the REXX interpreter to use a specific form of
<br>exponential format &nbsp; if &nbsp; the result of an arithmetic
operation requires the use of exponential notation
<br>with the current value of &nbsp; '''numeric digits'''.
<br>with the current value of &nbsp; '''numeric digits'''.


Line 440: Line 426:
The option can be in upper/lower/mixed case.
The option can be in upper/lower/mixed case.


If no &nbsp; '''numeric form''' &nbsp; statement is used, &nbsp; the
If no &nbsp; '''numeric form''' &nbsp; statement is used, &nbsp; the default for REXX programs is &nbsp; '''scientific'''.
default for REXX programs is &nbsp; '''scientific'''.


===options===
===options===
The &nbsp; '''OPTIONS''' &nbsp; statement is used to specify
The &nbsp; '''OPTIONS''' &nbsp; statement is used to specify to the REXX interpreter on such matters on how to
<br>process the source (statements), possibly (for instance) whether or not &nbsp; ''double byte character strings'' &nbsp;
to the REXX interpreter on such matters on how to
<br>are present, or possibly cause the REXX interpreter to force compliance to some particular rule or
<br>process the source (statements), possibly (for instance) whether or
not &nbsp; ''double byte character strings'' &nbsp;
<br>are present, or possibly
cause the REXX interpreter to force compliance to some particular rule or
<br>REXX (program) coding standards.
<br>REXX (program) coding standards.


There can be any number of options listed &nbsp; (or none).
There can be any number of options listed &nbsp; (or none).


Each particular REXX interpreters have their
Each particular REXX interpreters have their own &nbsp; '''options''', &nbsp; so it isn't considered an error if some
own &nbsp; '''options''', &nbsp; so it isn't considered an error if some
<br>option isn't supported (or recognized) by another REXX interpreter.
<br>option isn't supported (or recognized) by another REXX interpreter.


Some options are global in nature, others can be enabled and disabled.
Some options are global in nature, others can be enabled and disabled.


Some REXX interpreters also have a way to specify certain options via
Some REXX interpreters also have a way to specify certain options via the &nbsp; ''command-line'' &nbsp;
the &nbsp; ''command-line'' &nbsp;
<br>(also known as the &nbsp; ''C.L.'').
<br>(also known as the &nbsp; ''C.L.'').


===trace===
===trace===
The &nbsp; '''TRACE''' &nbsp; statement is used to cause the REXX
The &nbsp; '''TRACE''' &nbsp; statement is used to cause the REXX interpreter to turn &nbsp; ''off'' &nbsp; or ''on'' &nbsp; certain tracing
interpreter to turn &nbsp; ''off'' &nbsp; or ''on'' &nbsp; certain tracing
<br>facilities for the REXX interpreter.
<br>facilities for the REXX interpreter.


Most tracing options causes some sort of output &nbsp; (tracing of statements
Most tracing options causes some sort of output &nbsp; (tracing of statements or values of clauses) &nbsp; to be
or values of clauses) &nbsp; to be
<br>emitted to the console (terminal).
<br>emitted to the console (terminal).


The output (tracing information) written to the terminal is usually
The output (tracing information) written to the terminal is usually quite distinctive and can be easily
quite distinctive and can be easily
<br>recognized.
<br>recognized.


There are numerous options for
There are numerous options for the &nbsp; '''trace''' &nbsp; instruction, and they won't be explained here. <br><br>
the &nbsp; '''trace''' &nbsp; instruction, and they won't be explained here.


=={{header|Tcl}}==
=={{header|Tcl}}==