Is it possible to find defined and unused variables?

Everything else that doesn't fall into one of the other PB categories.
Axolotl
Enthusiast
Enthusiast
Posts: 435
Joined: Wed Dec 31, 2008 3:36 pm

Re: Is it possible to find defined and unused variables?

Post by Axolotl »

Hey acreis,
acreis wrote: Fri Oct 28, 2022 12:00 pm Good morning,

I'm trying write some ide tools, but I cannot retrive the handle of PureBasic Editor Scintilla window:
...
Any hint?
Thanks
No offense.
But your question has nothing to do with this topic?
It would be better to ask your questions in a new topic with its own heading.
In addition, it is always advisable to search for existing topics first....
Especially on the topic of pb-ide-tools there are countless examples to start from.
Like this: How to insert code to IDE on Mac and Linux

Keep in Mind: The environment variables are only valid when the ide is running.
So you have to create your code as executable and then call it from the ide...

Happy Coding and stay healthy.
Mostly running PureBasic <latest stable version and current alpha/beta> (x64) on Windows 11 Home
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Is it possible to find defined and unused variables?

Post by BarryG »

Sicro wrote: Wed Oct 26, 2022 6:55 pmisuseradmin_() is not a function, array, list, map or macro
Replace it with IsUserAnAdmin_() instead.
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 538
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: Is it possible to find defined and unused variables?

Post by Sicro »

BarryG wrote: Sat Oct 29, 2022 11:06 am Replace it with IsUserAnAdmin_() instead.
Yes, this is the correct API function name that AZJIO should use in its code, then my tool can check its code correctly.
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 538
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: Is it possible to find defined and unused variables?

Post by Sicro »

My tool now shows the output of the PureBasic compiler when the code could not be preprocessed.
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Post Reply