Richard H. McCullough wrote:
> Example from char.icn in mKE.
> This "bug" didn't show up until I tried to use the Unicon "char" function.
>  
> "icont -u -c char.icn" did not detect my missing declaration
>     local char
> in
>     procedure set_charnest(subject,charnest,nvtype)
>     ...
>     every char := ! charnest do {
>     ...
>     } # end every char
>     end
> because "char" is a built-in Unicon function.
>  
> It would be helpful if icont detected this kind of error.

Hmmm, tough call, since "char" is really just a global variable
that happens to be initialized to hold a function.  I rely on
being able to reassign such global variables for tracing,
overloading built-in functions, etc. and wouldn't want to see
those assignments flagged as errors, even with -u.

Perhaps there could be a flag (--lint?) that would warn of such
assignments as 'risky'?  There are probably other things that
could also be checked with that flag (--lint would imply -u,
of course).



-- 
Steve Wampler -- [email protected]
The gods that smiled on your birth are now laughing out loud.

------------------------------------------------------------------------------
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to