You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Language/Functions/Communication/Serial/parseFloat.adoc
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,29 @@ title: Serial.parseFloat()
14
14
15
15
[float]
16
16
=== 설명
17
-
`Serial.parseFloat()` returns the first valid floating point number from the Serial buffer. Characters that are not digits (or the minus sign) are skipped. `parseFloat()` is terminated by the first character that is not a floating point number. The function terminates if it times out (see link:../settimeout[Serial.setTimeout()]).
17
+
`Serial.parseFloat()` returns the first valid floating point number from the Serial buffer. `parseFloat()` is terminated by the first character that is not a floating point number. The function terminates if it times out (see link:../settimeout[Serial.setTimeout()]).
18
18
19
19
`Serial.parseFloat()` inherits from the link:../../stream[Stream] utility class.
20
20
[%hardbreaks]
21
21
22
22
23
23
[float]
24
24
=== 문법
25
-
`Serial.parseFloat()`
25
+
`_Serial_.parseFloat()` +
26
+
`_Serial_.parseFloat(lookahead)` +
27
+
`_Serial_.parseFloat(lookahead, ignore)`
26
28
27
29
28
30
[float]
29
31
=== 매개변수
30
-
Nothing
32
+
`_Serial_`: serial port object. See the list of available serial ports for each board on the link:../../serial[Serial main page]. +
33
+
`lookahead`: the mode used to look ahead in the stream for a floating point number. Allowed data types: `LookaheadMode`. Allowed `lookahead` values:
34
+
35
+
* `SKIP_ALL`: all characters other than a minus sign, decimal point, or digits are ignored when scanning the stream for a floating point number. This is the default mode.
36
+
* `SKIP_NONE`: Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
37
+
* `SKIP_WHITESPACE`: Only tabs, spaces, line feeds, and carriage returns are skipped.
38
+
39
+
`ignore`: used to skip the indicated char in the search. Used for example to skip thousands divider. Allowed data types: `char`
Copy file name to clipboardExpand all lines: Language/Functions/Communication/Stream/streamParseFloat.adoc
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,22 +14,29 @@ title: Stream.parseFloat()
14
14
15
15
[float]
16
16
=== 설명
17
-
`parseFloat()` returns the first valid floating point number from the current position. Initial characters that are not digits (or the minus sign) are skipped. `parseFloat()` is terminated by the first character that is not a floating point number. The function terminates if it times out (see ../streamsettimeout[Stream.setTimeout()]).
17
+
`parseFloat()` returns the first valid floating point number from the current position. `parseFloat()` is terminated by the first character that is not a floating point number. The function terminates if it times out (see link:../streamsettimeout[Stream.setTimeout()]).
18
18
19
-
This function is part of the Stream class, and can be called by any class that inherits from it (Wire, Serial, etc). See the link:../../stream[Stream class] main page for more informatio
19
+
This function is part of the Stream class, and can be called by any class that inherits from it (Wire, Serial, etc). See the link:../../stream[Stream class] main page for more information.
20
20
[%hardbreaks]
21
21
22
22
23
23
[float]
24
24
=== 문법
25
-
`stream.parseFloat(list)`
25
+
`stream.parseFloat()` +
26
+
`stream.parseFloat(lookahead)` +
27
+
`stream.parseFloat(lookahead, ignore)`
26
28
27
29
28
30
[float]
29
31
=== 매개변수
30
-
`stream` : an instance of a class that inherits from Stream.
32
+
`stream` : an instance of a class that inherits from Stream. +
33
+
`lookahead`: the mode used to look ahead in the stream for a floating point number. Allowed data types: `LookaheadMode`. Allowed `lookahead` values:
31
34
32
-
`list` : the stream to check for floats (`char`)
35
+
* `SKIP_ALL`: all characters other than a minus sign, decimal point, or digits are ignored when scanning the stream for a floating point number. This is the default mode.
36
+
* `SKIP_NONE`: Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
37
+
* `SKIP_WHITESPACE`: Only tabs, spaces, line feeds, and carriage returns are skipped.
38
+
39
+
`ignore`: used to skip the indicated char in the search. Used for example to skip thousands divider. Allowed data types: `char`
0 commit comments