|more useful options|
Re: "Useless use of private variable in void context"by BrowserUk (Pope)
|on Jun 20, 2003 at 21:35 UTC||Need Help??|
I concur with chromatic that the line you posted almost certainly isn't the line that is causing the error.
The binary chop technique of commenting out lumps of code is a very useful one, but isn't always practical. Often commenting out one block of code early in the routine, causes so many errors later in the code that the compiler aborts before it ever gets to the error you're trying to find. Another technique I picked up somewhere is to introduce a deliberate but benign error, one that won't cause the compiler to abort, and then move this slowly through the code until it transitions from appearing before the error you're trying to track down to after.
Here it is before
And here after
Simplistic, but it can sometimes be very effective.
Wouldn't it be nice if the error reported was
Useless use of $i in void context at ....
Examine what is said, not who speaks."Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller