HP 3000 Manuals

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


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

VGETIEEEREAL 

Copies character coded data contents from data buffer into an
application, converting numeric value to IEEE floating point format.

Syntax 

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

                 cstatus          Set to zero.

                 comarealen       Set to total number of two-byte words
                                  in comarea.

                 VGETIEEEREAL may set the following comarea items:

                 cstatus          Set to nonzero value if call is
                                  unsuccessful or if requested field has
                                  an error.

fieldnum         Two byte integer variable containing the number assigned
                 to the field by FORMSPEC. The field itself may not be
                 longer than 80 characters.

variable         Variable within application, of type IEEE floating point
                 real (32 bits), into which converted value is placed.

                 For Example:

                      VGETIEEEREAL(COMAREA,FIELDNUM,VARIABLE);

Discussion 

The content of the field denoted by the field number is read from the
data buffer.  This content must be numeric but its data type need not be;
numbers in a field of CHAR type can be converted.


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 commad, 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.
The numeric value, stored in the buffer in character coded form, is converted to IEEE floating point format and then copied to the variable in the application. If errors occur during conversion, cstatus is set to the appropriate error code. If the requested field's error code is set, its value is moved to the variable but cstatus is set to an error code.


MPE/iX 5.0 Documentation