Re: Variable declarations
- Posted by Jim Hendricks <jim at bizcomputinginc.com> Sep 19, 2004
- 399 views
Greg Haberek wrote: > > I think thats one of the few things we all did when we started, along > with improperly initializing variables. > > we've all done these, i'm sure: > > }}} <eucode> > -- wrong: > integer myint = 5 YUP! been there, done that. > > -- right: > integer myint myint = 5 Yes, so long as you are not in a function or procedure and you have other variables to declare as was specific question I raised at the beginning of this thread. > -- wrong: > integer myint > myint += 5 --wrong > > -- right: > integer myint > myint = 0 > myint += 5 OK, I can see this even though it didn't trip me up yet. It does bring rise to the question, "What is the value of a declared but not initialized integer?" With sequences it's the empty sequence {} or "" but what is it with atoms and integers? Jim Hendricks President Biz Computing, Inc.