Difference between revisions of "Variable Manager"
Line 3: | Line 3: | ||
To access the Variable Manager, select the Variables option from the Edit menu (Edit > Variables...) to see a list of variables that have been defined in a flowchart. You can reference ports directly or select from a list of available Global or Local variables. To add a new variable hover over the desired section and click on the arrows that appear. Variables can be deleted provided that they are not used by any icons within a flowchart. Flowcode will warn of this condition. | To access the Variable Manager, select the Variables option from the Edit menu (Edit > Variables...) to see a list of variables that have been defined in a flowchart. You can reference ports directly or select from a list of available Global or Local variables. To add a new variable hover over the desired section and click on the arrows that appear. Variables can be deleted provided that they are not used by any icons within a flowchart. Flowcode will warn of this condition. | ||
+ | |||
'''Note that the same functionality can be found in the [[Using the Project Explorer|Project Explorer]] and is the recommended method.''' | '''Note that the same functionality can be found in the [[Using the Project Explorer|Project Explorer]] and is the recommended method.''' |
Revision as of 14:03, 5 July 2013
<sidebar>Help Working With Macros and Variables Sidebar</sidebar>
To access the Variable Manager, select the Variables option from the Edit menu (Edit > Variables...) to see a list of variables that have been defined in a flowchart. You can reference ports directly or select from a list of available Global or Local variables. To add a new variable hover over the desired section and click on the arrows that appear. Variables can be deleted provided that they are not used by any icons within a flowchart. Flowcode will warn of this condition.
Note that the same functionality can be found in the Project Explorer and is the recommended method.
Constants
A constant is very similar to a variable, the difference being that you cannot alter the value later on in the program. When entering a value for your constant, you do not need to specify its type, Flowcode will assign the constant the most appropriate type between INT, LONG, FLOAT, STRING.
Common constants:
PI = 3.1415927
E = 2.7182818
Variable Manager Menu Options
The variable manager has different menu options depending on the selected object.
Add New
Will open up the create new variable/constant window. More information on creating variables and constants is available from the associated help topic.
Delete unused
Selecting this option will remove all the variables/constants from the list which have not been used in the flowchart.
Edit
For more information on editing variables see the associated help topic.
Delete
Selecting this will remove the variable from the project, you will be unable to delete a variable which you are using within the flowchart.
List occurrences
This option will add to the Icon lists pane which will show a list of all the occurrences of the selected variable from within the flowchart.
Convert to constant
A user can use this option on any initialized variable, doing so will convert it into a constant.