1. Variable not used error
- Posted by ChrisB (moderator) Aug 20, 2009
- 876 views
Hi
Just got back from Mallorca, only to find a beta release. Yay!
Testing it on old apps, and currently functioning ones, all seems fine except :
I use the old machine.e. within that is
-- variables and routines used in safe.e without warning integer check_calls check_calls = 1
Running with programs that use this (both on Windows and Linux) produces
Warning ( not_used ): <0229>:: /home/crylex/euphoria/include/machine.e - local variable 'check_calls' is not used
Adding and changing various without warnings makes no difference, but adding
-- variables and routines used in safe.e without warning integer check_calls check_calls = 1 check_calls += 1 check_calls = 1
resolves the issue.
Is this an over optimising issue?
Chris
PS - i just posted this without a subject heading, and got an internal server error.
2. Re: Variable not used error
- Posted by ArthurCrump Aug 20, 2009
- 828 views
I use the old machine.e. within that is
-- variables and routines used in safe.e without warning integer check_calls check_calls = 1
Running with programs that use this (both on Windows and Linux) produces
Warning ( not_used ): <0229>:: /home/crylex/euphoria/include/machine.e - local variable 'check_calls' is not used ...
When I came across this I just commented out the two lines referring to check_calls since it is local, not global, and cannot affect anything calling machine.e
I am only a Euphoria user, not involved with the implementation, but would guess that
without warning
is not behaving as it should.
It would also appear that v4 has a more strict definition of usage than v3.
With v3, giving a variable a value was 'using' it. On v4 it appears to be necessary to make proper use of it, not just to set it.
The redundant variable was always there with v3, but it didn't care.
Arthur Crump; (In England. Not to be confused with another Arthur Crump who sells software in America).
3. Re: Variable not used error
- Posted by jeremy (admin) Aug 20, 2009
- 853 views
PS - i just posted this without a subject heading, and got an internal server error.
Thanks for the report, I've added a bug report for this issue so it's not forgotten.
Jeremy