Skip to content

Document syntax for data types where missing #531

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
Feb 18, 2019
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
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/bool.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ A `bool` holds one of two values, `true` or `false`. (Each `bool` variable occup

[%hardbreaks]


[float]
=== Syntax
`bool var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/byte.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ subCategories: [ "Data Types" ]
A byte stores an 8-bit unsigned number, from 0 to 255.
[%hardbreaks]


[float]
=== Syntax
`byte var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/char.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ Characters are stored as numbers however. You can see the specific encoding in t
The char datatype is a signed type, meaning that it encodes numbers from -128 to 127. For an unsigned, one-byte (8 bit) data type, use the _byte_ data type.
[%hardbreaks]


[float]
=== Syntax
`char var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/double.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ Double precision floating point number. On the Uno and other ATMEGA based boards
On the Arduino Due, doubles have 8-byte (64 bit) precision.
[%hardbreaks]


[float]
=== Syntax
`double var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/size_t.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ subCategories: [ "Data Types" ]
`size_t` is a data type capable of representing the size of any object in bytes. Examples of the use of `size_t` are the return type of link:../../utilities/sizeof[sizeof()] and link:../../../functions/communication/serial/print[Serial.print()].
[%hardbreaks]


[float]
=== Syntax
`size_t var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/unsignedChar.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ The unsigned char datatype encodes numbers from 0 to 255.
For consistency of Arduino programming style, the byte data type is to be preferred.
[%hardbreaks]


[float]
=== Syntax
`unsigned char var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down
11 changes: 11 additions & 0 deletions Language/Variables/Data Types/word.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ subCategories: [ "Data Types" ]
A word stores a 16-bit unsigned number, from 0 to 65535. Same as an unsigned int.
[%hardbreaks]


[float]
=== Syntax
`word var = val;`


[float]
=== Parameters
`var`: variable name +
`val`: the value to assign to that variable

--
// OVERVIEW SECTION ENDS

Expand Down