Skip to content

Commit c16a45a

Browse files
committed
Document syntax for types where missing
Some of the type reference pages had syntax documentation, others didn't.
1 parent afde77c commit c16a45a

File tree

7 files changed

+77
-0
lines changed

7 files changed

+77
-0
lines changed

Language/Variables/Data Types/bool.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ A `bool` holds one of two values, `true` or `false`. (Each `bool` variable occup
2222

2323
[%hardbreaks]
2424

25+
26+
[float]
27+
=== Syntax
28+
`bool var = val;`
29+
30+
31+
[float]
32+
=== Parameters
33+
`var`: variable name +
34+
`val`: the value to assign to that variable
35+
2536
--
2637
// OVERVIEW SECTION ENDS
2738

Language/Variables/Data Types/byte.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ subCategories: [ "Data Types" ]
2020
A byte stores an 8-bit unsigned number, from 0 to 255.
2121
[%hardbreaks]
2222

23+
24+
[float]
25+
=== Syntax
26+
`byte var = val;`
27+
28+
29+
[float]
30+
=== Parameters
31+
`var`: variable name +
32+
`val`: the value to assign to that variable
33+
2334
--
2435
// OVERVIEW SECTION ENDS
2536

Language/Variables/Data Types/char.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ Characters are stored as numbers however. You can see the specific encoding in t
2424
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.
2525
[%hardbreaks]
2626

27+
28+
[float]
29+
=== Syntax
30+
`char var = val;`
31+
32+
33+
[float]
34+
=== Parameters
35+
`var`: variable name +
36+
`val`: the value to assign to that variable
37+
2738
--
2839
// OVERVIEW SECTION ENDS
2940

Language/Variables/Data Types/double.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ Double precision floating point number. On the Uno and other ATMEGA based boards
2222
On the Arduino Due, doubles have 8-byte (64 bit) precision.
2323
[%hardbreaks]
2424

25+
26+
[float]
27+
=== Syntax
28+
`double var = val;`
29+
30+
31+
[float]
32+
=== Parameters
33+
`var`: variable name +
34+
`val`: the value to assign to that variable
35+
2536
--
2637
// OVERVIEW SECTION ENDS
2738

Language/Variables/Data Types/size_t.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ subCategories: [ "Data Types" ]
2020
`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()].
2121
[%hardbreaks]
2222

23+
24+
[float]
25+
=== Syntax
26+
`size_t var = val;`
27+
28+
29+
[float]
30+
=== Parameters
31+
`var`: variable name +
32+
`val`: the value to assign to that variable
33+
2334
--
2435
// OVERVIEW SECTION ENDS
2536

Language/Variables/Data Types/unsignedChar.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ The unsigned char datatype encodes numbers from 0 to 255.
2424
For consistency of Arduino programming style, the byte data type is to be preferred.
2525
[%hardbreaks]
2626

27+
28+
[float]
29+
=== Syntax
30+
`unsigned char var = val;`
31+
32+
33+
[float]
34+
=== Parameters
35+
`var`: variable name +
36+
`val`: the value to assign to that variable
37+
2738
--
2839
// OVERVIEW SECTION ENDS
2940

Language/Variables/Data Types/word.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ subCategories: [ "Data Types" ]
2020
A word stores a 16-bit unsigned number, from 0 to 65535. Same as an unsigned int.
2121
[%hardbreaks]
2222

23+
24+
[float]
25+
=== Syntax
26+
`word var = val;`
27+
28+
29+
[float]
30+
=== Parameters
31+
`var`: variable name +
32+
`val`: the value to assign to that variable
33+
2334
--
2435
// OVERVIEW SECTION ENDS
2536

0 commit comments

Comments
 (0)