Re: Informix 4GL SMALLINT variables
Posted in 2000
Goes back to my college programming classes (at least the c-code version does). Always initialize your variables or you get whatever was previously in that memory location. Porting to C from RDS does show you all the short-cuts and BAD coding practices you may have used... Rob Vorbroker Obnoxio The Clown <obnoxio@hotmail.com> wrote in message news:8bq648$hil$1@news.xmission.com... > > From: "Richard harnden" <harndr@russelleurope.com> > > > >No. > > > >For p-code versions then they get initialized to null ( I think ). > > >For compiled versions they don't get initialized at all.. > > Half-right, and I was half-wrong. For p-code, numerics get initialised to 0, > strings get initialised to " ". For compiled C, nothing gets initialised -- > you just get what was in that memory location. It all comes back to me now, > like a bad meal. > > This is why I hated porting from RDS to C. You discovered all the short-cuts > you'd taken... :-) > > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com >