cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Variable is declared but never utilized" warning.

"Variable is declared but never utilized" warning.

When using FlexSim code editor, a warning will appear in case of a declared variable is not being used anywhere in the code. This will help to clean the code and save memory allocation if the code is modified and the variables not used anymore.

Some editors already uses this feature to warn the programmer that some variable is unecessarely declared, but not preventing from running the code anyway.

1 Comment
mischa_spelt
Advisor

How should this feature handle the standard code headers? I guess the variables defined there should be excluded somehow. After all: how often do you write an OnEntry trigger where you use current, item and port? Do you often have a Delay in Process Flow that depends on current, processFlow, token and activity?

Also, if I write int a = 3; int b = a; and never use a or b anymore, is a used or not? How about if I write a statement like a;

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report