get_xarg_val

Get a subroutine argument as an integer value

WSupported on Windows
USupported on Unix

 

 

INT_REG get_xarg_val(DESCRIP **argblock, int arg)

Arguments

argblock

The argument block pointer passed by the Synergy DBL subroutine to the C function.

arg

The number of the argument to reference.

Discussion

The get_xarg_val function gets a subroutine argument as an integer value.

The return value is the referenced argument evaluated as an integer. If the argument wasn’t passed, the returned value is zero. If the argument is alpha, it is treated as if it were decimal. If the argument is implied-decimal, it is rounded or truncated according to the Synergy DBL subroutine that was most recently called.

You must use the get_xarg_val function whenever the value of a Synergy DBL numeric field is required, even when the field is an integer. (Remember, integer data is stored in Synergy DBL fields in a variable-length, unaligned form, and you may not be able to access it directly.)

On OpenVMS, the functionality of get_xarg_val is available as dscr_to_int. See the xcallv.h file for details. The prototype is

INT_REG dscr_to_int(DESCRIP*)