HP 3000 Manuals

VPUTIEEEREAL [ Migration Process Guide ] MPE/iX 5.0 Documentation


Migration Process Guide

VPUTIEEEREAL 

The VPUTIEEEREAL intrinsic writes a floating-point number in IEEE
standard format from an application to a specified field in the form data
buffer in memory, converting the value to character-set-coded external
representation.  The syntax and parameter descriptions for this intrinsic
are provided below.

     VPUTIEEEREAL {COMAREA,FIELDNUM,VARIABLE}

COMAREA               Must be the COMAREA name specified when the forms
                      file was opened with VOPENFORMF. If not already
                      set, the following COMAREA items must be set before
                      calling VPUTIEEEREAL:

                      CSTATUS               Set to zero.

                      COMAREALEN            Set to total number of 2-byte
                                            words in COMAREA.

                      VPUTIEEEREAL may set the following COMAREA fields:

                      CSTATUS               Set to non-zero value if call
                                            is unsuccessful.

                      NUMERRS               Will be decremented if new
                                            value replaces the value of a
                                            field with an error.

FIELDNUM              Two-byte integer variable containing the field
                      number assigned by FORMSPEC to the field in the
                      data buffer to which the is written.  Note that the
                      field identified by FIELDNUM may not be longer than
                      80 characters.

VARIABLE              Variable of type IEEE floating-point real number
                      (32-bits) that contains the value to be converted
                      to character-set-coded external representation and
                      copied to a field in the data buffer.

This procedure converts an IEEE floating-point real number to its
character-coded form and writes the converted value to a particular field
in the data buffer, right justified.  The exact format of the written
data depends on the type of the destination field.

For example, if the number "34.56" were to be put in a field of type DIG,
the result would be "34", since a field of type DIG may only contain
integer values.  The destination field is identified by the field number
assigned by FORMSPEC. The field to which the value is written must be
defined as a numeric field (type NUM,IMP, or DIG).

Note that a field's number never changes unless the batch command
RENUMBER is used.  It is not changed, even if the position of the field
in the form is changed or its length or other characteristics are
changed.  The field number should not be confused with the position of
the field in the data buffer, which is based on the field position within
the form.  Thus, the field number provides a way to locate fields
regardless of their position.  If the specified field had an error, then
VPUTIEEEREAL will clear the field's error flag and decrement NUMERRS.

The following examples illustrate a call to VPUTIEEEREAL using common
programming languages:

COBOL:

     CALL "VPUTIEEEREAL" USING COMAREA FIELDNUM VARIABLE.

FORTRAN:

     CALL VPUTIEEEREAL(COMAREA,FIELDNUM,VARIABLE)

Pascal:

     VPUTIEEEREAL(COMAREA,FIELDNUM,VARIABLE);



MPE/iX 5.0 Documentation