...opening curly brace - in line 12 - fell victim to the experience that allows writing code top of your head without testing... (EDIT: obviously fixed now). I like this variable option. Put it as a single line with (could not let go my 'Schnapszahl'):
I use a similar approach for my debugging, logging:
if (lon) log(...);
In (my) emulation I have an overwrite that logs way much more...
It is always a good approach to keep code changes the smallest between dev and release... last but not least also to be able to fall back in case debug is needed without having to change code but just the value of a variable.
© Espruino, powered by microcosm.
Report a problem