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.