[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: motion for Aug: update mode operations for consistency



        This is item 18 for August.  - Dan

Date: Mon, 31 Jul 2006 10:29:32 -0700
From: Jim Thomas <jwthomas@xxxxxxxxxx>
Subject: motion for Aug: update mode operations for consistency

Dan, I'd like to make the following motion at the August meeting.

-Jim

-----------------

Motion:  update mode operations for consistency


Rationale:  The current specification in 7.8.6-7.8.8 for mode operations
predates the current specification in clause 6 of modes themselves, and
hence is not fully consistent in terminology or concepts.  Also, the
style of the mode operations interface is not consistent with that of
the flag operations which the committee approved in the motion of Agenda
item #18 in June.  This proposal addresses both these inconsistencies.


Text changes:

Replace 7.8.6 and 7.8.7 with the following:
---------------
7.8.6 Operations on individual modes

All implementations shall provide the following non-computational
operation for each supported MODE (see clause 6):

MODEType getMODE(void)

-- get current value for MODE.  Under constant specification for MODE,
getMODE returns the constant value.  Under dynamic specification for
MODE, getMODE returns the current value of the dynamic MODE variable.
Elsewhere, the return value is language defined (and may be
unspecified).

For the rounding direction modes, the getMODE operations are:

binaryRoundingDirectionType getBinaryRoundingDirection(void)
decimalRoundingDirectionType getDecimalRoundingDirection(void)

With constant-mode specification, the value of the mode is set by the
specification directive itself.  Implementations supporting
constant-mode specification (as defined by the language), shall provide
for constant specification of the default and each specific value of the
mode.

Implementations supporting dynamic specification for MODE shall provide
the following non-computational operation:

void setMODE(MODEType)
-- set the value of the dynamic mode variable.  The operand may be any
of language-defined representations for the default and each specific
value of MODE. The effect of this operation if used outside the static
scope of a dynamic specification for MODE is language defined (and may
be unspecified).

For the rounding direction modes, the setMODE operations are:

void setBinaryRoundingDirection(binaryRoundingDirectionType)
void setDecimalRoundingDirection(decimalRoundingDirectionType)
---------------

Replace (current) 7.8.8 with
---------------
7.8.7 Operations on all modes with dynamic specification

Implementations supporting dynamic specification for modes shall provide
the following non-computational operations on all such
dynamic-specifiable modes collectively.

-- modeGroupType saveModes(void)
save values of all dynamic-specifiable modes as a group

-- void restoreModes(modeGroupType)
restore values of all dynamic-specifiable modes as a group

-- void defaultModes(void)
set all dynamic-specifiable modes to default values

The return values of the saveModes operation are for use as operands of
the restoreModes operation in the same program; this standard does not
require support for any other use.

The effect of these operations if used outside a scope of a dynamic
specification for a dynamic-specifiable mode is language defined (and
may be unspecified).


754 | revision | FAQ | references | list archive