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

motion: clarify manifest mode operations



The need for this clarification became apparent during correspondence with
Jim Thomas about differences between motions #20 and #31

Motion: clarify manifest mode operations

Rationale for motion:
During email with Jim Thomas, I realized that the mode operations were
not effectively formulated to provide manifest and varying modes.
The motion is to be closer to what I had in mind.
The semantics are spelled out in greater detail too.

Text:

Replace this text:

   5.STATE.3. Mode operations

 Languages define the following operations, required for each supported MODE:

     * MODE-type get-MODE(void)
     * boolean isdefault-MODE(void) true iff MODE
       currently has its default value.

   5.STATE.4. Varying mode operations

 Languages that permit varying mode specifications define the following
 operations, required for each supported varying MODE:

     * default-MODE(void) to restore default mode parameter
     * void set-MODE(MODE-type) to set mode parameter

 Languages that permit varying mode specifications define the following
 operations as well, that act upon all varying modes as a group:

     * mode-group-type save-modes(void)
     * void restore-modes(mode-group-type)
     * void default-modes(void) to restore all defaults

   Languages define the effect of these varying-mode operations when
   invoked in code that was not declared to use varying modes.


with this:

5.STATE.3. Operations on individual modes

Implementations shall provide the following non-computational operations 
for each supported MODE:

        * MODE-type get-MODE (void) 
        get prevailing value of MODE

        * void default-MODE (void) 
        set prevailing value of MODE to its default

        * void set-MODE-VALUE (void)  for each VALUE of MODE
        set prevailing value of MODE to a constant VALUE 
        [e.g. set-rounding-direction-to-nearest-even()]

[
Note that these operations could also be provided in a form like a C pragma,
        #pragma ROUNDING_DIRECTION_MODE TO_NEAREST_EVEN
or less conveniently as constant arguments of a function like 
        set-rounding-direction(to-nearest-even);
]

5.STATE.4.1. Operations on individual varying modes

Implementations supporting varying modes shall provide the following 
non-computational operations for each such MODE:

        * void set-MODE (MODE-type) 
        set prevailing value of MODE to a value that might not a constant

Languages that allow declarations that a MODE is not varying, also define the 
effect of these varying-mode operations when invoked within the scope of such 
declarations.

5.STATE.4.2. Operations on all varying modes

Implementations supporting varying modes shall provide the following 
non-computational operations for all such modes collectively:

        * mode-group-type save-modes (void)
        save values of all varying modes as a group

        * void restore-modes (mode-group-type)
        restore values of all varying modes as a group

        * void default-modes (void) 
        set all varying modes to default values

Languages that allow declarations that all modes are not varying, also define
the effect of these varying-mode operations when invoked within the scope of 
such declarations.

</pre>
</body>
</html>

754 | revision | FAQ | references | list archive