Message-ID: <38F6581B.6AA843EE@hotmail.com> From: Andrew Hakman X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Bracketing: A Matter of Style References: <38f61149 DOT 272044426 AT news DOT warwick DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 55 Date: Thu, 13 Apr 2000 23:29:25 GMT NNTP-Posting-Host: 142.13.16.203 X-Trace: typhoon.mbnet.mb.ca 955668565 142.13.16.203 (Thu, 13 Apr 2000 18:29:25 CDT) NNTP-Posting-Date: Thu, 13 Apr 2000 18:29:25 CDT Organization: MBnet Networking Inc. To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com As I mentioned in a previous post though (is this a duplicate? I seem to remember reading this a while ago), I agree with Eli because if you use RHIDE, and autoindent, it uses a mixture of tabs and spaces. When you move files from machine to machine (that all have different settings) that have been autoindented in this way, it becomes a real pain. Andrew Richard Slobod wrote: > [reposted, as it doesn't seem to have gone through the first time] > > Eli Zaretskii wrote: > > > >On Mon, 10 Apr 2000, Richard Slobod wrote: > > > >> Eli Zaretskii wrote: > >> > >> >You took a trivial example. Try a real-life program, and you'll see > >> >what I mean. The problem happens because indentation uses blanks and > >> >spaces together. Tabs change their size, but blanks don't. > >> > >> Huh? If you indent with tabs, then you indent with tabs, not a mixture of > >> tabs and spaces. > > > >It depends on the indenting style. If every indentation level is 2 > >columns deep, then the 4th level will use a tab, the 5th will use a tab > >and a space, etc. > > But if you were messing around with the tab size you obviously wouldn't > indent like that; you'd make every indent level a tab and just set the tab > width to your desired indent size. > > >Using a tab for each level wastes the line width too quickly, IMHO. > > Not if you set the tab size smaller. That was my original point: if you > indent with tabs, you can have the indents as wide or as narrow as you wish. > > >> Could you post an example of what you're talking about? > > > >This is from the DJGPP library (file name fflush.c): > > [fairly lengthy code listing snipped] > > But that code was clearly formatted with the inherent assumption that tabs > are exactly equivalent to eight spaces; someone using a nonstandard tab size > simply wouldn't have written it that way. > > Mixing tabs and spaces in this way will indeed cause parts of the code to be > misaligned where that assumption is false, but that's not an issue if you > consistently indent with tabs only. (For that matter, IMHO, if you want > something that's guaranteed to be exactly eight spaces wide, it's safest to > simply use eight spaces. Admittedly, that will increase the file size a > bit.)