1 (edited by Daba 2018-05-12 13:23:07)

Topic: Duplicate links to same variable

If you create two (or more) objects linked to the same sketch variable, the sketch compiler generates the declaration as many times as you use it.

This causes an IDE compile error, and you can't just delete the duplicate reference because it upsets the byte counts, and the app cannot connect to your project.

It might be a rare scenario in the real world, but, for example, seeing if a bargraph or a meter type display looks better during design, or I might want to display a variable both as a graph, and a value....

Surely it can't be hard to stop the re-declaration of an already used variable...

2B, or not 2B, that is the pencil ...