Skip to content

Commit f0431be

Browse files
[Documentation] Missing data type (#817)
* [Documentation] Missing data type In the documentation of Floating Point is this example: ``` n = 0.005; // 0.005 is a floating point constant ``` This code simply won't compile and get this error : 'n' does not name a type so this Line should be : ``` const float n = 0.005; // 0.005 is a floating point constant ``` Although this error may seem trivial for some professional , but I think it seems misleading to newcomers. * Update Language/Variables/Constants/floatingPointConstants.adoc Co-authored-by: per1234 <[email protected]> Co-authored-by: per1234 <[email protected]>
1 parent 898949b commit f0431be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Language/Variables/Constants/floatingPointConstants.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Similar to integer constants, floating point constants are used to make code mor
3434

3535
[source,arduino]
3636
----
37-
n = 0.005; // 0.005 is a floating point constant
37+
float n = 0.005; // 0.005 is a floating point constant
3838
----
3939
[%hardbreaks]
4040

0 commit comments

Comments
 (0)