All data conversion functions must be integer functions returning TRUE if the data or string was successfully converted and FALSE if an error occurred.
All data conversion functions must accept four parameters: a pointer to a string, a pointer to a data variable of the appropriate type for the field, a pointer to a field structure, and a pointer to a conversion buffer.
The complete call for a function that converts data is as follows:
|
||
|
|
|
|
|
|
|
|
|
|
|
|
The size of the string is based on the length of the field picture. The system passes a conversion buffer so you do not have to allocate memory in your data conversion functions. The conversion buffer is of the size specified in the field type structure for the field type and should be large enough to hold the longest string representation of the underlying variable.