but all these variants gave the same error
There are two issues
"compiled" sometimes cannot determine right data type of variable, for that
bngl==trueinstead of just
bnglhelps as this forces type to bool while
bnglcan be anything. Same trick for forcing integer type would be
"jit" has operator
&¬ implemented so you need to replace that.
&is "bitwise and" which results in number instead of bool but otherwise works
>true && false =false >true & true =1 >true & false =0 >null & false =0 >undefined & 1 =0 >false & 5 =0
Thanks, @Gordon. i'm afraid I'm still struggling: another line in my program contains:
which gives the same error. I've tried adding parentheses as in your suggestion, eventually ending up with abominations like
but all these variants gave the same error. Frustratingly, just including the offending line in a simple test program works perfectly so the problem must be due to something elsewhere in the code. I will try to sort it out.
I'm afraid I've been doing exactly what you and @fanoush warn against, sticking "compiled" on the entire draw loop. This runs at 5 frames per second versus about 1.5 for raw or vanilla. So while I don't want ignore your advice , I'm loathe to give up the extra speed - it will be interesting to see what JIT delivers when I can get that working.
My use of the watch is entirely focused on interesting watch faces - I have very few other apps installed so RAM usage and startup speed aren't really issues. I would like to contribute something to the community, however, so when I have this face working properly I hope to publish it.