From: 71231 DOT 104 AT compuserve DOT com (Richard Slobod) Newsgroups: comp.os.msdos.djgpp Subject: Re: Bracketing: A Matter of Style Date: Sun, 09 Apr 2000 18:38:34 GMT Organization: Warwick Online Lines: 56 Message-ID: <38f0bd4f.307788499@news.warwick.net> References: NNTP-Posting-Host: m201-3-p27.warwick.net X-Trace: news.warwick.net 955305587 25313 208.242.201.132 (9 Apr 2000 18:39:47 GMT) X-Complaints-To: usenet AT news DOT warwick DOT net NNTP-Posting-Date: 9 Apr 2000 18:39:47 GMT X-Newsreader: Forte Free Agent 1.21/32.243 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > >On Sat, 8 Apr 2000, Richard Slobod wrote: >> The only potential problem I can see is that, for example, someone working >> with 2-space-wide tabs might tend to have some lines that are over 80 >> characters wide when the tabs are expanded to 8 spaces, but that's a minor >> problem, at least IMHO. It's not like the source will be completely mangled >> when viewed with a different tab size. > >The problem I was referring to is that the indentation gets completely >scrwed up if the sources are vewed with a different setting of a tab >width, or printed on a printer. The indents get shrunk or grown, but that's a far cry from "completely screwed up". We're talking about the difference between void sayhello(void) { printf("Hello\n"); } and void sayhello(void) { printf("Hello\n"); } Neither of those looks screwed up to me. As for printing, if your editor doesn't support directly printing the source using the current tab size, you can always pass it through a filter. >> Also note that 1) this isn't likely to be an issue if you're the only one >> who ever works with the source files in question and 2) it's trivial to >> replace the tabs with the desired number of spaces if you should need to. > >The replacement with spaces should be done by whoever changes the tab >size. Not necesarily. If you want to make certain that anyone viewing the code knows what tab size you used, it's easy enough to stick a comment to that effect in the file. Also note that there's no reason why two people working on the same source code file necesarily have to view it using the same tab size; the preferred indent spacing does, after all, vary by the individual. As I said, you need to be a bit careful about where you break long lines in that case if you want to maintain a consistent maximum line length, but I really don't think that that's a major problem. >But the number of editors which allow to indent with spaces >only is much smaller than the number of editors which allow to change >the tab size, and people tend to forget to do it, even if it is >supported by the editor. I'm not quite sure what you're saying here.