Reference.ParseInt History

Hide minor edits - Show changes to markup

April 03, 2015, at 02:26 PM by Arturo -
Changed lines 1-2 from:

Serial.parseInt()

to:

parseInt()

April 03, 2015, at 01:38 PM by Arturo -
Changed lines 5-6 from:

Serial.parseInt() returns the first valid (long) integer number from the serial buffer. Characters that are not integers (or the minus sign) are skipped.

to:

parseInt() returns the first valid (long) integer number from the serial buffer. Characters that are not integers (or the minus sign) are skipped.

April 03, 2015, at 01:35 PM by Arturo -
April 03, 2015, at 01:18 PM by Arturo -
Added line 17:
April 03, 2015, at 01:18 PM by Arturo -
Changed lines 17-18 from:
to:

Serial.parseInt(char skipChar)

Changed lines 20-22 from:

none

to:

skipChar: used to skip the indicated char in the search. Used for example to skip thousands divider.

April 03, 2015, at 12:33 PM by Arturo -
Changed lines 10-11 from:
  • If no valid digits were read when the time-out occurs, 0 is returned;
to:
  • If no valid digits were read when the time-out (see Serial.setTimeout()) occurs, 0 is returned;
April 03, 2015, at 11:51 AM by Arturo -
Deleted lines 11-13:

Serial.parseInt() is terminated by the first character that is not a digit.

April 03, 2015, at 11:51 AM by Arturo -
Added line 12:
April 03, 2015, at 11:51 AM by Arturo -
Added line 6:
April 03, 2015, at 11:50 AM by Arturo -
Added lines 6-10:

In particular:

  • Initial characters that are not digits or a minus sign, are skipped;
  • Parsing stops when no characters have been read for a configurable time-out value, or a non-digit is read;
  • If no valid digits were read when the time-out occurs, 0 is returned;
Deleted line 14:
Changed lines 24-25 from:

int

to:

long

April 17, 2012, at 10:36 PM by Scott Fitzgerald -
Changed lines 25-26 from:
to:
April 17, 2012, at 10:35 PM by Scott Fitzgerald -
Changed lines 25-27 from:
to:
April 17, 2012, at 10:35 PM by Scott Fitzgerald -
Added lines 1-27:

Serial.parseInt()

Description

Serial.parseInt() returns the first valid (long) integer number from the serial buffer. Characters that are not integers (or the minus sign) are skipped. Serial.parseInt() is terminated by the first character that is not a digit.

Serial.parseInt() inherits from the Stream utility class.

Syntax

Serial.parseInt()

Parameters

none

Returns

int

See also

Reference Home

Share