Pages: [1]   Go Down
Author Topic: Serial.print reference page ambiguity  (Read 461 times)
0 Members and 1 Guest are viewing this topic.
Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

The reference page for Serial.print (http://arduino.cc/en/Serial/Print) gives the impression that its argument is alwasy treated as an 8-bit value,  even though internally (at least as of version 0013) it's apparently being handled as a long (setting an int "x" to -1 and executing:
Code:
Serial.print(x, HEX);
produced "FFFFFFFF").

Suggestions:

1. Change the phrase "b: the byte to print, or" to something like "b: the value to print, or".

2. Change one or more examples to print a value greater than 255.

3. Add a warning that values < 0 with HEX will produce 8-digit (rathern than the expected 2- or 4-digit) output.

Ran
Logged

Pages: [1]   Go Up
Jump to: