EnableExplicit : Warning for unused declared variables

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
charvista
Addict
Addict
Posts: 949
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

EnableExplicit : Warning for unused declared variables

Post by charvista »

I believe EnableExplicit must warn also for unused declared variables.

As stated here in "weaker points" as well:
http://web.newsguy.com/lmgava/purebasic/about/index.php
Defined but unused variables are not reported at the end of the compilation. This pose the risk of forgetting a variable or maybe even an array or something bigger inside a procedure because you modify it and forget to remove a variable no more referenced.

And it makes full-sense of EnableExplicit.
Last edited by charvista on Sat Nov 23, 2013 1:16 am, edited 1 time in total.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: EnableExplicit : Warning for unused declared variables

Post by luis »

Hey ! I'm innocent, I don't have nothing to do with it ! I don't even know him !#$%!@*! :wink:


EDIT:

Just found this post by chance 4 years later.
I bet there are tons of dead variables in PB programs at this very moment waiting to be reported ...
Last edited by luis on Sun Jan 07, 2018 2:31 pm, edited 1 time in total.
"Have you tried turning it off and on again ?"
A little PureBasic review
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: EnableExplicit : Warning for unused declared variables

Post by IdeasVacuum »

+ 1
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply