We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentCore,  Processing Development Environment (PDE) › Odd indentation behavior in processing IDE
Page Index Toggle Pages: 1
Odd indentation behavior in processing IDE (Read 1848 times)
Odd indentation behavior in processing IDE
Jun 1st, 2010, 8:11pm
 
In the IDE, I notice this odd thing with indenting.  When I type a line of code that's indented, the next line ought to begin indented at the same place, right?
e.g.:

Code:

if (true)
{
println("hello");
println("world");
}


usually that works fine.  But there is one case where something strange happens.  If you write the curlies first, put some space betwen them, then fill in the code, each subsequent line starts creeping off to the left.

Code:

void draw()
{
if(true)
{
println("a");
println("b");
println("c");
println("d");
}
}


For some reason I always write this way, setting up the blocks first and then filling in the code, so I always spend all this time re-indenting everything.  I think this probably doesn't affect anyone else, because it's bugged me for nearly a decade but I've never heard anyone else complain about it  Grin  

any ideas how i might fix that?  

Re: Odd indentation behavior in processing IDE
Reply #1 - Jun 2nd, 2010, 2:04am
 
I never saw this behavior. I just tried again to reproduce it, no success: the indentation is kept at the same level.

Perhaps describe more in detail how you proceed?
Re: Odd indentation behavior in processing IDE
Reply #2 - Jun 3rd, 2010, 9:11pm
 
I'm also unable to reproduce it. I tried writing the brackets first, and then typing in the println statements. A more detailed explanation of exactly what you're doing might help.
Page Index Toggle Pages: 1