HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

628 AppendixJ
HP PRECISION ARCHITECTURE
HPPA INTRINSICS
their position.
The numeric value, stored in the buffer in character coded form, is converted to IEEE
floating point long 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.
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
.