From f0431beef401d606ceb5856089b95d557ba86cfb Mon Sep 17 00:00:00 2001 From: Mohammed Hemed <7507590+mohammedhemed77@users.noreply.github.com> Date: Sat, 13 Aug 2022 14:13:22 +0200 Subject: [PATCH] [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 Co-authored-by: per1234 --- Language/Variables/Constants/floatingPointConstants.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Language/Variables/Constants/floatingPointConstants.adoc b/Language/Variables/Constants/floatingPointConstants.adoc index 43e248203..2d3defe04 100644 --- a/Language/Variables/Constants/floatingPointConstants.adoc +++ b/Language/Variables/Constants/floatingPointConstants.adoc @@ -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]