1. Euphoria bug found (warning system)

Hello again,

I ran into a bug in Euphoria's warning system that warns of an error
that isnt really there.  I would bet other people ran into the same
thing.

Here's the code that emits a warning when the program tries to
exit:

  constant MenuItem_Sep001=create(MenuItem,"-",FPUMenu2,-1,0,1,0,0)

The warning issued is:

  "MenuItem_Sep001 not used"

The warning goes away if i change that single line to:

  atom garbage
  constant MenuItem_Sep001=create(MenuItem,"-",FPUMenu2,-1,0,1,0,0)
  garbage=MenuItem_Sep001

Apparently, the warning system thinks constants arent used if
they are never used on the right side of another statement.

--Al

new topic     » topic index » view message » categorize

2. Re: Euphoria bug found (warning system)

Al Getz writes:

> constant MenuItem_Sep001=create(MenuItem,
>                  "-",FPUMenu2,-> 1,0,1,0,0)
>
>The warning issued is:
>
>  "MenuItem_Sep001 not used"

The symbol "MenuItem_Sep001" never appears 
anywhere else in your program, so Euphoria issues
a warning about it. Most warnings are false alarms.
They are just meant to point out suspicious-looking
things in your code. Add "without warning" just before
this declaration, and you won't be warned about it 
any more. 

You have several other warnings besides this one.
If they are also false alarms, you can deal with them 
in a similar way. It's best to put "without warning" in the 
specific file that is generating a warning, but if you want, 
you can just put "without warning" at the top of your 
main .exw file, and turn off all warnings, everywhere.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Euphoria bug found (warning system)

Hi Al,

> Well it is a bug, or its not a bug, depending on
> how you look at it.  Eu 2.0 doesnt emit a warning.

In relnotes.doc, we can see:
.....
 Version 2.1 alpha-test release January 15, 1999:
.....
 * Warnings are now displayed *after* your program
   finishes execution, so they won't be erased by 
   clear_screen(), graphics_mode() etc. Some programs
   now show warnings where none were seen before.
.....

So, in Eu 2.1, Eu 2.2 we can see Eu 2.0's FIXED bug,
not Eu 2.2, 2.1's own BUG, I think.

Then, is FIXED bug a bug? Yes it is. Isn't ?

smile smile

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu