Write a cast function
A cast function is a user-defined function that converts one data type (the source data type), to another data type (the target data type).
A cast can be one of the following types:
- An implicit cast is a cast that the database server can invoke automatically when it encounters data types that cannot be compared with the system-defined casts.
- An explicit cast is a cast that you must specifically invoke, with either the CAST AS keywords or with the cast operator (::).
Tip: This section describes how
to create a cast function that is written in C. For general information
about how to create user-defined functions and casts, see the Informix® User-Defined Routines
and Data Types Developer's Guide.