Format of q_data descriptors
q_data descriptors contain additional information you need to fix up the parameter or result fields of the math q_data structures, the result field of the program interruption q_data structures, or fields for any conditions whose q_data structures contain q_data descriptors. The descriptors contain information about the length and data type of these fields. The format of the q_data descriptor is illustrated in Figure 1.
Figure 1. Format of
a q_data descriptor
The following information is provided by the q_data descriptor
shown in Figure 1:
- data_type_1
- A 1-byte binary integer value that, along with data_type_2, indicates the data type. See Table 1 for the values and their corresponding data types.
- data_type_2
- A 1-byte binary integer value that, along with data_type_1, indicates the data type. See Table 1 for the values and their corresponding data types.
- length
- A 4-byte binary integer value that represents the length of the data.
For each type code that can occur in a q_data descriptor, Table 1 shows the corresponding data type.
data_type_1 type code | data_type_2 type code | Description |
---|---|---|
2 | 0 | String of single-byte characters with no length prefix or ending delimiter |
1 | 13 | Signed binary integer whose length is 1, 2, 4, or 8 bytes |
1 | 14 | Floating-point number whose length is 4, 8, or 16 bytes |
1 | 15 | Complex number whose length is 8, 16, or 32 bytes |
1 | 18 | Unsigned binary integer whose length is 1 byte |