alericardi / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Typo in keywords.txt for comparison reference #966

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enter if (x <= 3 || x >= 8 || y == 7)
2. Double-click each comparison operator and press Ctrl-Shift-F in turn, noting 
the message in the status line. Also notice whether context menu enables 
checking the reference materials for each operator.

What is the expected output? 

All three comparison operators should enable the context menu option. All three 
should display a message saying no reference is available.

What do you see instead?

You'll see message reporting 'No reference available for ">="' or "==". That's 
correct for "==" according to keyword.txt, but wrong for ">=". Also, the 
context menu won't enable the option to look up the ">=" operator in the 
reference materials.

The reason is that keywords.txt has these lines in it:
<       greaterthan
<=      greaterthanorequalto
which is incorrect, of course, and also
<       lessthan
<=      lessthanorequalto

I think we should add If to the ==, <, >, >=, and <= operators like so:
==      If
<               If
<=              If
>               If
>=              If
since the documentation for If (conditional) also covers the comparison 
operators.

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?
Using version 1.0.1. OS and board don't matter.

Please provide any additional information below.

Original issue reported on code.google.com by roncraig...@gmail.com on 25 Jun 2012 at 3:32

GoogleCodeExporter commented 9 years ago
I think this section of keywords.txt should look like:
==      If
>       If
>=      If
++      Increment
!=      If
<<      Bitshift
<       If
<=      If

Original comment by roncraig...@gmail.com on 25 Jun 2012 at 3:35

GoogleCodeExporter commented 9 years ago
Can you submit a patch or GitHub pull request for this?

Original comment by dmel...@gmail.com on 29 Jun 2012 at 3:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Patch attached.

Original comment by roncraig...@gmail.com on 29 Jun 2012 at 10:26

Attachments:

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/issues/966#issuecomment-119915215

Original comment by federico...@gmail.com on 9 Jul 2015 at 11:14