-
• #2
Not sure what's going on - is the code uploading correctly, or do you have something else saved in Espruino? I just ran all 3, on Pico and original boards using the 1v79 release from the website and got:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v79 Copyright 2015 G.Williams >echo(0); [ "f1(): " ] [ "f2(): " ] [ "f3(): " ] =undefined > =undefined [ "fE(): " ]
Which is exactly what you'd expect?
Below three code fragments just work fine - on uploading the code - up and including [1v75]. The setTimeout() happens and calls fE(). Not so though in [v1V79]. All three are broken: setTimeout() is not happening, does not throw any error, and fE() is just not invoked.
Fragment 1:
Fragment 2:
Fragment 3:
The misterious work around below works:
But the work around works only if he extra function is THE onInit() function. If onInit() is renamed to, for example, abc(), it is not working...
???