Variables Tricks

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.
Post Reply
BenR
Matrix Staff
Posts: 2307
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 639 times
Been thanked: 848 times

Variables Tricks

Post by BenR »

When creating multiple variables of the same type you can create several at once by adding the names separated by commas in the create a new variable dialogue.

ss1.jpg
ss1.jpg (35.24 KiB) Viewed 109 times

The initial value entry will assign the same default value to all of the created variables. It is highly recommended to always assign a known value to a variable before reading a variable back in your program so assigning a meaningful initial value is very good practise.

Providing clear and meaningful names for your variables will help in the long run when it comes to coding and debugging the functionality. An optional description can be added to each variable to provide more details about it.

Variables that are unused in your project will appear greyed out in the Variables tab of the Project Explorer window.

ss2.png
ss2.png (7.79 KiB) Viewed 109 times

Any unused variables can be automatically deleted by right clicking the Constants or Variables headings and selecting "Delete unused".

ss3.png
ss3.png (4.9 KiB) Viewed 109 times

References to a specific variable can be searched by right clicking a variable and selecting "List occurrences".

ss4.png
ss4.png (8.97 KiB) Viewed 109 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

Post Reply