Informix 4GL SMALLINT variables
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, can anyone confirm that SMALLINT variables, if uninitialised, take on the value of 0 (zero). And whether this is the case on all platforms and flavours of UNIX. Regards Rekaish Bhardwaj (rekaishb@compans.com)
I seem to recall that the treatment depended on whether the variable was GLOBAL or local. GLOBAL variables were inititialized to NULL, while local variables were "undefined". That was v4.x Under INITIALIZE in the v6 documentation, it mentions that the value of un-initialized variables in undefined. Rudy Rekaish Bhardwaj wrote: > Hi, can anyone confirm that SMALLINT variables, > if uninitialised, take on the value of 0 (zero). > And whether this is the case on all platforms and flavours of UNIX. > > Regards > > Rekaish Bhardwaj > (rekaishb@compans.com)
Rekaish Bhardwaj wrote: > Hi, can anyone confirm that SMALLINT variables, > if uninitialised, take on the value of 0 (zero). > And whether this is the case on all platforms and flavours of UNIX. > > Regards > > Rekaish Bhardwaj > (rekaishb@compans.com) Going back a bit to the beginning of 4GL, when RDS was not yet available. In the 4GL/C compiler no variable of any type ever gets INITIALIZED to anything if the programer has not specified in his program. This problem does not exist in RDS because the p code because the runner is taking care of these things, much slower though. In other compilers there is a flag for initializing uninitialized variables to NULL at compile time, if you need to know. -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other RDBMS such as Oracle. Hydra 4GL Compiler (Compatible with I4GL) Compile once, run everywhere Phoenix Windows GUI. (Front End to 4GL) Chimera Java GUI The only GUI you will ever need... (Front End to 4GL) Arachne Web Technology (Front End to 4GL on the Web & HTML Report Generator) ESQL/C Compiler For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------