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.
Page Index Toggle Pages: 1
Tidy code ... (Read 1619 times)
Tidy code ...
Apr 19th, 2010, 11:17am
 
in java all you have to do is press Tab at the begging of a line of code it will automatically go to where it is supposed to, is there a similar key for proccessing or is there a certain way you should lay your program out ?

Many thanks  Wink
Re: Tidy code ...
Reply #1 - Apr 19th, 2010, 10:18pm
 
Your description is... confusing.
What are you talking about? An IDE? An editor? Focus change between controls?
What "is is supposed to" go? Who?
Do you mean indenting?

Mmm, I should pay more attention to titles, sometime people forget to repeat the information in the body of the message...
So it is about some IDE or editor (in java doesn't exist, Java is a programming language, not an editor) and indeed about proper indenting.

I have a powerful tool for indenting: my editor which keep indentation of the previous line, my fingers which use Tab when needed when I code. Ie. I try and keep tidy code as I write it.
Two tricks in the PDE:
- You can select a block of lines and hit Tab (or Shift-Tab). It indents (and de-indent) it whole. Tab works on a single line, but not Shift-Tab. Sad
- You can go to Tools > Auto format.
It has reported glitches, but it can help in general.
Re: Tidy code ...
Reply #2 - Apr 19th, 2010, 10:24pm
 
This Topic was moved here from Syntax Questions by PhiLho.
Page Index Toggle Pages: 1