In Data Lover I have excluded annotations, for example has_pressure
fr245m.excludeAnnotations=has_pressure
at certain points I'm using this in my code, for example in the declaration
(:has_pressure)
hidden var presUnit = 1.0;
at other points I'm not using them, because I don't like to duplicate my functions for all possible excludeannotation patterns
function getIteratorMultiply (bChart)
{
if (bChart == 23) {
return presUnit; // no exludeAnnotation here
} else {
return 1.0;
}
}
while from a compiler point of view this could fail, I know that bChart can never be 23 for devices that don't have pressure.
and sure it would be nicer if I excluded code at all places to make the compiler happy
and sure it would be nicer if I used type checking everywhere, but this project has grown historically.
Works fine to compile with SDK 4.1.5
Fails to compile with SDK 4.1.6 and SDK 4.1.7 (error message: ERROR: fr245m: C:\_Personal\git\connectiq\DataLover\source-device\Fr245m.mc:113,20: Undefined symbol ':presUnit' detected. )
you shouldn't hold hands for developers who want to have type checking off (and you should definitely not enforce them to follow your ideal coding convention)