Pages: [1]   Go Down
Author Topic: IDE bug with braces //{, "{", '{' that aren't part of the code  (Read 341 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Put this to IDE, move the text cursor to each brace and see that it guides you wrong.
Code:
if (character=="{") //{
{
dostuff;
}
}
}

I bet there's way easy IDE fix for this problem.
I couldn't find any topic about this, sorry if it's a repost.
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 249
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just confirmed it with version 1.04 of the IDE.  I'm surprised nobody noticed this before.
Logged

Unthinking respect for authority is the greatest enemy of truth - Einstein.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13469
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

checked  - CTRL-T auto formatter does its job right.  (it says too much right } )

It is the match function that fails,
never noticed as I try to do my indenting consequently with { } on separate lines.
Than you can see which pair matches

Code:
if (condition1)
{
  while (condition2)
  {
    if (character=="{")  //{
    {
      dostuff;
    }
  }
}
« Last Edit: January 19, 2014, 07:04:43 am by robtillaart » Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: