October 27, 2025, 10:22:55 PM

News:

IWBasic runs in Windows 11!


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