FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   nested one-line loop with brackets doesn't indent
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: nested one-line loop with brackets doesn't indent  (Read 371 times)
kevinP

Email
nested one-line loop with brackets doesn't indent
« on: Jun 6th, 2004, 10:56pm »

Hi all,
 
The one-line IF-loop marked with an arrow is nested inside an outer loop and should be indented by "Beautify" (shouldn't it)? If I remove the brackets it works fine.
 
-K [linux, 0068 alpha]
 
Code:

void keyPressed()
{
  // Press LEFT or RIGHT arrow keys to rotate selected polygon.
  if(key == LEFT || key == RIGHT) {
    int sign = 1;
  if(key == LEFT) { sign = -1; }; // <<--------
    selected.rot += 30 * sign;
    selected.rot = selected.rot % 360;
  }
}
« Last Edit: Jun 6th, 2004, 11:22pm by kevinP »  

Kevin Pfeiffer
fry


WWW
Re: nested one-line loop with brackets doesn't ind
« Reply #1 on: Jun 11th, 2004, 6:40pm »

yeah, known bug though i'm not sure if i've documented it elsewhere. i've added it to the list.
 
Pages: 1 

« Previous topic | Next topic »