Skip to content

Correct syntax section of parseFloat() reference pages #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Language/Functions/Communication/Serial/parseFloat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,29 @@ title: Serial.parseFloat()

[float]
=== 설명
`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()]).
`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()]).

`Serial.parseFloat()` inherits from the link:../../stream[Stream] utility class.
[%hardbreaks]


[float]
=== 문법
`Serial.parseFloat()`
`_Serial_.parseFloat()` +
`_Serial_.parseFloat(lookahead)` +
`_Serial_.parseFloat(lookahead, ignore)`


[float]
=== 매개변수
Nothing
`_Serial_`: serial port object. See the list of available serial ports for each board on the link:../../serial[Serial main page]. +
`lookahead`: the mode used to look ahead in the stream for a floating point number. Allowed data types: `LookaheadMode`. Allowed `lookahead` values:

* `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.
* `SKIP_NONE`: Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
* `SKIP_WHITESPACE`: Only tabs, spaces, line feeds, and carriage returns are skipped.

`ignore`: used to skip the indicated char in the search. Used for example to skip thousands divider. Allowed data types: `char`

[float]
=== 반환
Expand Down
17 changes: 12 additions & 5 deletions Language/Functions/Communication/Stream/streamParseFloat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,29 @@ title: Stream.parseFloat()

[float]
=== 설명
`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()]).
`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()]).

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
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.
[%hardbreaks]


[float]
=== 문법
`stream.parseFloat(list)`
`stream.parseFloat()` +
`stream.parseFloat(lookahead)` +
`stream.parseFloat(lookahead, ignore)`


[float]
=== 매개변수
`stream` : an instance of a class that inherits from Stream.
`stream` : an instance of a class that inherits from Stream. +
`lookahead`: the mode used to look ahead in the stream for a floating point number. Allowed data types: `LookaheadMode`. Allowed `lookahead` values:

`list` : the stream to check for floats (`char`)
* `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.
* `SKIP_NONE`: Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
* `SKIP_WHITESPACE`: Only tabs, spaces, line feeds, and carriage returns are skipped.

`ignore`: used to skip the indicated char in the search. Used for example to skip thousands divider. Allowed data types: `char`

[float]
=== 반환
Expand Down