VGETIEEEREAL [ Migration Process Guide ] MPE/iX 5.0 Documentation
Migration Process Guide
VGETIEEEREAL
The VGETIEEEREAL intrinsic copies character-coded data from a specified
field in the form data buffer in memory into an application, converting
the numeric value to IEEE floating-point format. The syntax and
parameter descriptions for this intrinsic are provided below.
VGETIEEEREAL {COMAREA,FIELDNUM,VARIABLE}
COMAREA Must be COMAREA name specified when the forms file
was opened with VOPENFORMF. If not already set, the
following COMAREA items must be set before calling
VGETIEEEREAL:
CSTATUS Set to zero.
COMAREALEN Set to total number of 2-byte
words in COMAREA.
VGETIEEEREAL may set the following COMAREA fields:
CSTATUS Set to nonzero value if call
is unsuccessful or if field's
error flag is set.
FIELDNUM Two-byte integer variable containing the field
number assigned by FORMSPEC to the field in the
data buffer from which the value is retrieved.
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) in which the converted value will be
placed.
This intrinsic reads the field identified by its field number from the
data buffer. (Note that this field number is a unique number assigned to
each field by FORMSPEC and is totally independent of the field position
in the data buffer.) The field's value must be numeric, but its data
type need not be. That is, numbers in a character type field can be
converted.
The numeric value, stored in the buffer in character coded form, is
converted to IEEE format and then moved to the variable in the
application. If errors occur during conversion, CSTATUS is set to an
error code. If the requested field's error flag is set, its value is
moved to the variable, but CSTATUS is set to an error code.
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.
The following examples illustrate a call to VGETIEEEREAL using common
programming languages:
COBOL:
CALL "VGETIEEEREAL" USING COMAREA FIELDNUM VARIABLE.
FORTRAN:
CALL VGETIEEEREAL(COMAREA,FIELDNUM,VARIABLE)
Pascal:
VGETIEEEREAL(COMAREA,FIELDNUM,VARIABLE);
MPE/iX 5.0 Documentation