News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Positron Studio wrongly report unused variables

Started by Yves, Aug 30, 2023, 09:22 AM

Previous topic - Next topic

Yves

Hello all,

I like the excellent  Positron Studio that can help a lot on building up code. There is just something I can find a little confusing is after compiling it reports so some variables that are not used when clearly they are used in the code. Is it something I'm missing in the setup?

Regards,

Yves
Yves

JohnB

Positron Studio only checks for unused variables at the source code level.  Some libraries declare additional internal variables which only get used at compile time.  If there are other situations where I am wrongly reporting unused variables then let me know the details and I will look into it.
JohnB

Yves

Hi John,

I place all my variables dim into an Variables.inc files and various important routines are in *.inc files for easy reading. The .bas file is use to declare all the .inc right at the beginning and mostly directing the flow of the code. Therefore all variables should report as unused if I understood your above explanation but only some are reported at the end of the compilation though they are required. I'm a bit confused there.

Regard,

Yves 
Yves