March 28, 2024, 09:17:22 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Defining variables

Started by Brian, December 07, 2018, 07:38:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

December 07, 2018, 07:38:22 AM Last Edit: December 08, 2018, 04:56:58 AM by Brian Pugh
Never noticed before, but if you predefine a variable, say, INT test, and never use it in your program, it will be flagged up as an unreferenced variable at compile time

But if you define it as INT test=0, and still never use it, there is no unreferenced warning message, probably because the variable already holds a value at compile time

Obviously, autodefine needs to be set to "off"

Always something new to learn!

Brian