CVTIIV
Pass an integer value to a field
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
|
The CVTIIV routine was deprecated in Synergy/DE version 9; we recommend you use an integer assignment instead, as shown in the note in the Discussion. |
xcall CVTIIV(value, field)
Arguments
value
Passed directly or using one of the following functions: (n)
^VAL = Pass the integer by value.
^REF = Pass the integer by reference.
^XTRNL = Pass the integer by external reference. (OpenVMS only)
field
The variable that will be loaded with the binary value. (n)
Discussion
We recommend that you replace the deprecated CVTIIV routine with an integer assignment. For example,
retlen = ^addr(prcnmlen)
retlen = numeric field
retlen = ^xtrnl(SOME LITERAL) See Moving integer data to a decimal/packed destination for more information about assigning integer values. |
The CVTIIV subroutine converts an integer value to a specified field with no data type conversion. The integer must be passed by value, reference, or external reference.
The CVTIIV subroutine supports only three integer sizes:
1 |
Byte size |
2 |
Word size |
4 |
Longword size |
Designating a size other than 1, 2, or 4 generates an “Argument specified with wrong size” error ($ERR_ARGSIZ).
You can use this routine to store the address of a field in a variable by using the ^REF function as the first argument. You can also use CVTIIV to store an externally defined constant or address by using the ^XTRNL function.
Examples
xcall cvtiiv(^ref(variable), byte_val)