1. Re: Request for v2.5 'Warning' system

Al Getz wrote:
> Here's a request for the Euphoria v2.5 
> 
> 
> Issue: Warning System
> 
> 
> Problem:
> I have found that there are many warnings issued for
> function parameters that are not used and this is normal
> so it would be nice to be able to turn them alone off
> rather then disable the whole warning system.
> 
> 
> Sample code:
> 
> function MyFunction(atom this, atom that)
>     atom thisother
>     DosStuff()
>     return 1
> end function
> 
> 
> A warning would be issued about 'this' and 'that'.
> 
> A command such as:
> 
> without warning "function parameters"
> 
> Would turn off the warning only for the variables 
> 'this' and 'that' in the above function declaration.
> The warning for 'thisother' would still be issued.

Currently you can say:

without warning
function MyFunction(atom this, atom that)
      atom thisother
      DosStuff()
      return 1
end function
with warning

I don't think it's worth it to add extra
qualifiers to the warning system. You can already
turn off warnings for your whole program, or a
file (starting at any point), or around a particular
routine or group of routines.

I wonder if this unused parameter situation
mainly happens when a routine is called via routine_id(),
and is one of many similar routines that are called
with a similar set of parameters.
Perhaps I could omit this warning for routines that are
explicitly named in any routine_id() call.

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

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu