HP 3000 Manuals

VPUTIEEELONG [ Migration Process Guide ] MPE/iX 5.0 Documentation


Migration Process Guide

VPUTIEEELONG 

Writes a floating point number in IEEE long 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.

     VPUTIEEELONG {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 VPUTIEEELONG:

                      CSTATUS               Set to zero.

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

                      VPUTIEEELONG 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 value is written.  Note
                      that the field identified by FIELD may not be
                      longer than 80 characters.

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

This intrinsics converts an IEEE long 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
VPUTIEEELONG will clear the field's error flag and decrement NUMBERS.

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

COBOL:

     CALL "VPUTIEEELONG" USING COMAREA FIELDNUM VARIABLE.

FORTRAN:

     CALL VPUTIEEELONG(COMAREA,FIELDNUM,VARIABLE)

Pascal:

     VPUTIEEELONG(COMAREA,FIELDNUM,VARIABLE);



MPE/iX 5.0 Documentation