Progress
Embedded SQL-92
Guide and Reference
Type Specifications for Host Language Types
Declares a variable or type that corresponds to a type supported by the host language. This host language type declaration must be within a BEGIN-END DECLARE SECTION.
SYNTAX
variable_name
C Language variable name.
TYPE new_type_name
The new type that corresponds to a type supported by the C Language.
IS OF TYPE host_language_type
Declares a variable or type that corresponds to a type supported by the host language.
NOTES
EXAMPLE
- The C Language type int is not supported by ESQLC. Type int maps to 16 or 32 bits depending on the machine architecture. This can create rounding errors at runtime as values are passed across different machine architectures.
- You can declare a variable to be of a specific type without using a host language type. For example, this variable declaration defines a variable of type long integer:
- For convenience, you can define a new type which inherits all the properties of a host language type or a previously-declared type. You can use the new type to declare variables or other types in ESQLC statements or in C Language statements.
- You can declare ESQLC variables of C Language types in this form:
For example, the following declaration declares
customer_no
to be a variable of C Language typeunsigned long
.
ENVIRONMENT
Embedded SQL-92 only
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |