Re: Informix 4GL SMALLINT variables
Posted in 2000
Years ago we were using an old flavour of UNIX whose C compiler *did* initialise variables. When we got a more up-to-date UNIX where variables were *not* initialised the sh*t hit the fan. Assume for 4GL compilation that variables are *not* initialised. RDS does initialise them. And this applies not only to SMALLINT but INTEGER, MONEY etc. By the by I only use INTEGER in program variables apart from the 'LIKE tabname.colname' ones. We had problems caused by SELECT COUNT(*) INTO smallint breaking because the count was too large for SMALLINT to handle. Of course in a table SMALLINT is fine. In article <954253648.8699.0.nnrp-02.c1ed1f69@news.demon.co.uk>, Tony Flaherty <aef@mfs.misys.co.uk> writes >The clowns right....again :o) > >Rather annoying in that using RDS and the interactive debugger does not find >problems caused by forgetting to initialise variables. > >-- >--------------------------------------- >Tony Flaherty aef@mfs.misys.co.uk >Analyst Programmer >Misys Financial Systems >All statements and opinions are my own, >Misys don't pay me enough to have opinions >on their behalf > >. >Obnoxio The Clown wrote in message <8bpv2j$bpr$1@news.xmission.com>... >> >>From: Rekaish Bhardwaj <RekaishB@compans.com> >>> >>>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. >> >>In RDS yes, C-compiled no. Last time I looked, anyway. >>______________________________________________________ >>Get Your Private, Free Email at http://www.hotmail.com >> > > -- Surfer!