Scalar Variables
A scalar IDL_VARIABLE is distinguished by not having the IDL_V_ARR bit set in its flags field. A scalar variable must have one of the basic data types (IDL structures are never scalar) shown in Table 7-1. The data for a scalar variable is stored in the IDL_VARIABLE itself, using the IDL_ALLTYPES union. The following table gives the relationship between the data type and the field used.
Table 7-1: Scalar Variable Data Locations
|
Scalar Data Type
|
Field that Stores Data
|
|
IDL_TYP_UNDEF
|
None.
|
|
IDL_TYP_BYTE
|
value.c
|
|
IDL_TYP_INT
|
value.i
|
|
IDL_TYP_UINT
|
value.ui
|
|
IDL_TYP_LONG
|
value.l
|
|
IDL_TYP_ULONG
|
value.ul
|
|
IDL_TYP_LONG64
|
value.l64
|
|
IDL_TYP_ULONG64
|
value.ul64
|
|
IDL_TYP_FLOAT
|
value.f
|
|
IDL_TYP_DOUBLE
|
value.d
|
|
IDL_TYP_COMPLEX
|
value.cmp
|
|
IDL_TYP_DCOMPLEX
|
value.dcmp
|
|
IDL_TYP_STRING
|
value.str
|
|
IDL_TYP_PTR
|
value.hvid
|
|
IDL_TYP_OBJ
|
value.hvid
|