Hi Paul,
I found the following weird behaviour in Teensyduino, I guess this is a bug. A sample source code to reproduce the bug is:
Running this program yields the following result:
I don't think this is the correct result. Since the first line has 6 characters, the second line should be 6 instead of 3, isn't it?
I tracked the source code to printFloat function in Print.cpp file, this function has 2 variables named count, I think the reason is that these 2 variables are messed up.
Let me know what you think, thanks a lot!
I found the following weird behaviour in Teensyduino, I guess this is a bug. A sample source code to reproduce the bug is:
PHP:
#include <Arduino.h>
void setup() {
int c = Serial.print(123.45);
Serial.println();
Serial.println(c);
}
void loop() {
}
Running this program yields the following result:
PHP:
123.45
3
I don't think this is the correct result. Since the first line has 6 characters, the second line should be 6 instead of 3, isn't it?
I tracked the source code to printFloat function in Print.cpp file, this function has 2 variables named count, I think the reason is that these 2 variables are messed up.
Let me know what you think, thanks a lot!