Idea

Lucas Klein avatar image
4 Likes"
Lucas Klein suggested Mischa Spelt commented

"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.

code editorprogrammingwarnings
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Mischa Spelt avatar image Mischa Spelt commented ·

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;

0 Likes 0 ·

No Comments

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.