![]() |
| |||||||
| View Poll Results: How do you indent? | |||
| Tabs | | 18 | 54.55% |
| 1 space per level | | 0 | 0% |
| 2 or 3 spaces per level | | 6 | 18.18% |
| 4 through 6 spaces per level | | 7 | 21.21% |
| 7+ spaces per level | | 2 | 6.06% |
| Voters: 33. You may not vote on this poll | |||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Registered User Join Date: Oct 2008
Posts: 452
| How do you indent: spaces or tabs? I prefer indenting with two spaces. |
| EVOEx is offline | |
| | #2 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| 4 spaces. I used to use tabs until I realized it made the source code look different depending on what application was viewing it.
__________________ bit∙hub [bit-huhb] n. A source and destination for information. |
| bithub is offline | |
| | #3 |
| Banned Join Date: Mar 2009
Posts: 533
| 2 spaces
__________________ ╔╗╔══╦╗ ║║║╔╗║║ ║╚╣╚╝║╚╗ ╚═╩══╩═╝ |
| ಠ_ಠ is offline | |
| | #4 |
| (?<!re)tired Join Date: May 2006 Location: Portugal
Posts: 5,220
| @Echo bithub
__________________ Originally Posted by brewbuck: Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster. |
| Mario F. is offline | |
| | #5 |
| Guest Join Date: Aug 2001
Posts: 4,923
| I bet a bunch of newbies are going to read this thread and be like "huh? wuzzat???". ![]() Anyway, one tab or 6 spaces. |
| Sebastiani is offline | |
| | #6 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,359
| So, we need to periodically hold this poll so as to determine some trend?
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is online now | |
| | #7 |
| Registered User Join Date: Oct 2008
Posts: 452
| |
| EVOEx is offline | |
| | #8 |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,359
| Well, there seems to be several threads about indent style, but the one that most closely matches this poll is... How far do you indent?
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way |
| laserlight is online now | |
| | #9 | |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| Quote:
__________________ bit∙hub [bit-huhb] n. A source and destination for information. | |
| bithub is offline | |
| | #10 |
| Registered User Join Date: Jan 2005
Posts: 7,137
| I use tabs (set to the width of 4 spaces) because we use Visual C++ exclusively for our coding and tabs are easiest to work with. On personal projects I often set my editor to convert tabs to spaces (still at 4 spaces per tab). For code I post on forums I have a macro that converts all tabs to 4 spaces that I run before posting since tabs don't look so good on these forums. |
| Daved is offline | |
| | #11 |
| Guest Join Date: Aug 2001
Posts: 4,923
| I'd like to add that one space just isn't sufficient. On a side note, I wonder if anyone indents using only semicolens? |
| Sebastiani is offline | |
| | #12 | |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| I follow Linus's lead: Quote:
| |
| Kennedy is offline | |
| | #13 |
| Super Moderator Join Date: Sep 2001
Posts: 4,680
| When I'm indenting blocks of code like functions, conditionals, etc... I use tabs. When I'm trying to get various parts of the code to line up (like when I have very similar lines of code and I want to emphasize their similiarity and clarify the different parts of each line, I use spaces (that way it doesn't get messed up if someone uses 4-space-tabs instead of my 8-space-tabs). edit: Linus Torvalds endorses my 8-space-tabs? YES! |
| sean is offline | |
| | #14 | |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,359
| Quote:
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | |
| laserlight is online now | |
| | #15 |
| (?<!re)tired Join Date: May 2006 Location: Portugal
Posts: 5,220
| Who is Linus Torvalds? EDIT: Just found it on Wikipedia. Didn't look too impressive. But 8 space tabs surely look impressive on C++ generic programming...
__________________ Originally Posted by brewbuck: Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster. Last edited by Mario F.; 09-22-2009 at 11:41 AM. |
| Mario F. is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing 3 spaces to tabs | dnguyen1022 | C Programming | 2 | 12-22-2008 12:51 AM |
| Tabs or Spaces | DavidP | General Discussions | 46 | 04-08-2007 11:45 AM |
| Visual C++ | Golffor1 | C++ Programming | 1 | 08-04-2003 04:30 PM |
| tabs to spaces with dev c++ v.4 | stallion | Windows Programming | 2 | 01-28-2003 02:07 PM |
| Tab Controls - API | -KEN- | Windows Programming | 7 | 06-02-2002 09:44 AM |