RE: Euphoria bug found (warning system)
- Posted by Al Getz <Xaxo at aol.com> Apr 07, 2001
- 433 views
Chris Bensler wrote: > I wouldn't say it's a bug. The constant ISN'T used. Only assigned. > > Rather than assigning it to a garbage variable, why not just assign the > Control_ID to a variable? > > atom MenuItem_Sep001 > MenuItem_Sep001=create(MenuItem,"-",FPUMenu2,-1,0,1,0,0) > > By doing it this way, your code can be more flexible too. > You can reassign a different control to MenuItem_Sep001, IE. for dynamic > > menus. > > Or... just use without warning, that's what it's for. > > Chris Hello again, Well it is a bug, or its not a bug, depending on how you look at it. Eu 2.0 doesnt emit a warning. It's known as a "dummy constant". Dummy variables are sometimes used to initialize code also, but im not going to worry about it, ill just insert "without warning" at the start of the file like my previous post had mentioned. I think it would be harder for Eu to track down which constants were being used as dummy constants though, so its better left alone. Oh and the 'garbage' variable was used just to illustrate the fact that that using the constant in another line prevented the warning, as i dont actually include that in any program Bye for now, --Al