The EGL calling function pushes its arguments onto the stack and the called C function pops them off of the stack to use the values. The called function pushes its return values onto the stack and the caller pops them off to retrieve the values. The pop and return external functions are provided with the argument stack library. The pop external functions are described below according to the data type of the value that each pops from the argument stack. The return external functions are described in "Return functions for C."
Library functions for returning values
Pre-Version 7.31 name | Version 7.31 and later name |
---|---|
popint | ibm_lib4gl_popMInt |
popshort | ibm_lib4gl_popInt2 |
poplong | ibm_lib4gl_popInt4 |
popflo | ibm_lib4gl_popFloat |
popdub | ibm_lib4gl_popDouble |
popdec | ibm_lib4gl_popDecimal |
The structure types dec_t and ifx_int8_t are used to represent DECIMAL and BIGINT data in a C program. For more information about the dec_t and ifx_int8_t structure types and library functions for manipulating and printing DECIMAL and BIGINT variables, see the IBM Informix ESQL/C Programmer's Manual.
Library Functions for Popping Character Strings
Pre-Version 7.31 name | Version 7.31 and later name |
---|---|
popquote | ibm_lib4gl_popQuotedStr |
popstring | ibm_lib4gl_popString |
popvchar | ibm_lib4gl_popVarChar |
Both ibm_lib4gl_popQuotedStr( ) and ibm_lib4gl_popVarChar( ) copy exactly len bytes into the string buffer *qv. Here ibm_lib4gl_popQuotedStr( ) pads with spaces as necessary, but ibm_lib4gl_popVarChar( ) does not pad to the full length. The final byte copied to the buffer is a null byte to terminate the string, so the maximum string data length is len-1. If the stacked argument is longer than len-1, its trailing bytes are lost.
Library Functions for Popping Time Values
Pre-Version 7.31 name | Version 7.31 and later name |
---|---|
popdate | ibm_lib4gl_popDate |
popdtime | ibm_lib4gl_popDateTime |
popinv | ibm_lib4gl_popInterval |
The structure types dtime_t and intrvl_t are used to represent DATETIME and INTERVAL data in a C program. The qual argument receives the binary representation of the DATETIME or INTERVAL qualifier. For more information about the dtime_t and intrvl_t structure types and library functions for manipulating and printing DATE, DATETIME, and INTERVAL variables, see the IBM Informix ESQL/C Programmer's Manual.
Library Functions for Popping BYTE or TEXT Values
Pre-Version 7.31 name | Version 7.31 and later name |
---|---|
poplocator | ibm_lib4gl_popBlobLocator |
Any BYTE or TEXT argument must be popped as BYTE or TEXT because EGL provides no automatic data type conversion.