Few of the functions defined in the Espruino reference define limits for the parameters. For example setTimeout does not specify a valid range for the timeout. I would expect hardware limits the max timeout or perhaps code handles values larger than hardware bounds, but the documentation does not provide users such knowledge.
It looks as though the parameter range for many functions may not matter. For example serial.write takes a string, I assume as large as can be stored, and streams it out.
If would be helpful to add more parameter information as code evolves and changes get made to functions. In the interim, do you have any words of wisdom, gotchas, etc. regarding parameter constraints in general.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon,
Few of the functions defined in the Espruino reference define limits for the parameters. For example setTimeout does not specify a valid range for the timeout. I would expect hardware limits the max timeout or perhaps code handles values larger than hardware bounds, but the documentation does not provide users such knowledge.
It looks as though the parameter range for many functions may not matter. For example serial.write takes a string, I assume as large as can be stored, and streams it out.
If would be helpful to add more parameter information as code evolves and changes get made to functions. In the interim, do you have any words of wisdom, gotchas, etc. regarding parameter constraints in general.