Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 trying to make BlackJack
Index -> Programming, C++ -> C++ Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Fri Nov 11, 2005 5:14 pm   Post subject: (No subject)

Flikerator wrote:
Cornflake wrote:
back on the original topic... kinda... did anyone else notice the horrible formating in the original code?! Seems to me that the first thing people should be taught is how to write readable code.


Im just getting used to indenting myself. Since turing had a built in indentation [F2] I rarely did it myself.

Are there any text editors with a C/C++/C# Indentation in them, that you know of?


Almost certainly, but get used to doing it yourself.
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Fri Nov 11, 2005 7:31 pm   Post subject: (No subject)

Please do. For me, one of the most important things about coding is indenting well. On your own.

If you wish to not follow my advice, I don't see how you could have a hard time looking, I haven't seen an editor that doesn't have auto-indent.
md




PostPosted: Fri Nov 11, 2005 9:51 pm   Post subject: (No subject)

The only auto-indentation I use is the ones where each new line has the same number of blank spaces before the first character as the line before. It's really handy as even though I keep track of my own indentation putting 8 or 12 spaces at the front of each line slows typing quite a bit...
wtd




PostPosted: Fri Nov 11, 2005 10:06 pm   Post subject: (No subject)

Cornflake wrote:
The only auto-indentation I use is the ones where each new line has the same number of blank spaces before the first character as the line before. It's really handy as even though I keep track of my own indentation putting 8 or 12 spaces at the front of each line slows typing quite a bit...


So only use 3 or 4 spaces as your unit of indentation.
[Gandalf]




PostPosted: Fri Nov 11, 2005 10:29 pm   Post subject: (No subject)

If only they made a convention, using tab would be a lot easier Sad.
md




PostPosted: Fri Nov 11, 2005 10:57 pm   Post subject: (No subject)

wtd wrote:
Cornflake wrote:
The only auto-indentation I use is the ones where each new line has the same number of blank spaces before the first character as the line before. It's really handy as even though I keep track of my own indentation putting 8 or 12 spaces at the front of each line slows typing quite a bit...


So only use 3 or 4 spaces as your unit of indentation.


4 is my unit, however there are times when I get to 3 levels of indentation, and occasionally even 4. 3*4 is 12 Wink Also many editors can be set up to replace tabs with a set number of spaces... and if they can't it's not hard to write a short program to change it all over for you...
wtd




PostPosted: Fri Nov 11, 2005 11:26 pm   Post subject: (No subject)

Cornflake wrote:
wtd wrote:
Cornflake wrote:
The only auto-indentation I use is the ones where each new line has the same number of blank spaces before the first character as the line before. It's really handy as even though I keep track of my own indentation putting 8 or 12 spaces at the front of each line slows typing quite a bit...


So only use 3 or 4 spaces as your unit of indentation.


4 is my unit


Excellent. I was worried you meant you used 8 or even twelve spaces for one unit of indentation. I've encountered this before.

Try viewing that code in an 80x25 console.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 22 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: