ChrisRowland
Active member
I've found what seems to me to be a bug in the Serial.print() function, this code illustrates it:
I would expect that this would print the string I've provided, - " abcd" but what is printed is "abcd", without the leading spaces. It seems pretty generic, I found this after spending hours trying to debug a print number function that wasn't showing the leading spaces I was adding.
Chris
Code:
void setup()
{
Serial.begin(9600);
Serial.println(" abcd");
}
void loop(){}
I would expect that this would print the string I've provided, - " abcd" but what is printed is "abcd", without the leading spaces. It seems pretty generic, I found this after spending hours trying to debug a print number function that wasn't showing the leading spaces I was adding.
Chris