HP 3000 Manuals

VPUTIEEEREAL [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

VPUTIEEEREAL 

Writes a floating point number in IEEE standard format from an
application to a specified field in the form data buffer, converting the
value to character set coded external representation.

Syntax 

     VPUTIEEEREAL {comarea,fieldnum,variable}

Parameters 

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 two-byte words
                                  in comarea.

                 VPUTIEEEREAL may set the following comarea items:

                 cstatus          Set to nonzero value if call is
                                  unsuccessful.

                 numerrs          May be decremented if a new value
                                  replaces the old value of a field with
                                  an error.

fieldnum         Two-byte integer variable containing the number assigned
                 by FORMSPEC to the field in which the value is written.
                 The field itself may not be longer than 80 characters.

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

                 For example:

                      VPUTIEEEREAL(COMAREA,FIELDNUM,VARIABLE);

Discussion 

This intrinsic 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 destination field.  For example, if the
number "34.56" were put to a field of type DIG, the result would be "34"
since such a field may contain only the digits 0 through 9.  The
destination field is identified by the field number assigned by FORMSPEC,
and must be defined as a numeric field, that is, type NUM, IMP or DIG.

If the specified field had an error, VPUTIEEREAL will clear the field's
error flag and decrement numerrs.


NOTE The field number is a unique number assigned to each field by FORMSPEC and is completely independent of the field's position in the data buffer or the form. It only changes if the batch command, RENUMBER, is used. You can alter the length, position or other characteristics of a field without affecting the field number. The field number provides a way to locate fields regardless of their position.


MPE/iX 5.0 Documentation