• Thanks, @Gordon. i'm afraid I'm still struggling: another line in my program contains:

    if (dest==2 && y>1 && y<5) {...

    which gives the same error. I've tried adding parentheses as in your suggestion, eventually ending up with abominations like

    if (((dest==2)==true) && (((y>1)==true) && ((y<5))==true)) {...

    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.

  • but all these variants gave the same error

    There are two issues

    • "compiled" sometimes cannot determine right data type of variable, for that bngl==true instead of just bngl helps as this forces type to bool while bngl can be anything. Same trick for forcing integer type would be something|0

    • "jit" has operator && not implemented so you need to replace that. & is "bitwise and" which results in number instead of bool but otherwise works

      >true && false
      >true & true
      >true & false
      >null & false
      >undefined & 1
      >false & 5

Avatar for BillV @BillV started