Skip to content

Commit

Permalink
[Documentation] Missing data type (#817)
Browse files Browse the repository at this point in the history
* [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]>
  • Loading branch information
mohammedhemed77 and per1234 authored Aug 13, 2022
1 parent 898949b commit f0431be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Language/Variables/Constants/floatingPointConstants.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Similar to integer constants, floating point constants are used to make code mor

[source,arduino]
----
n = 0.005; // 0.005 is a floating point constant
float n = 0.005; // 0.005 is a floating point constant
----
[%hardbreaks]

Expand Down

0 comments on commit f0431be

Please sign in to comment.