Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site utcsri.UUCP Path: utzoo!utcsri!greg From: greg@utcsri.UUCP (Gregory Smith) Newsgroups: net.lang.c Subject: Re: Indentation and braces Message-ID: <2922@utcsri.UUCP> Date: Thu, 5-Jun-86 09:50:22 EDT Article-I.D.: utcsri.2922 Posted: Thu Jun 5 09:50:22 1986 Date-Received: Thu, 5-Jun-86 10:23:28 EDT References: <855@bentley.UUCP> <-18363551@sneaky> Reply-To: greg@utcsri.UUCP (Gregory Smith) Organization: CSRI, University of Toronto Lines: 53 Summary: In article <-18363551@sneaky> gordon@sneaky writes: ^^^^^ ???? > >> ... >> However, if indentation always reflects your intention, then eliminating the >> braces and making indentation significant would prevent this type of bug in >> the first place! >> >> Karl W. Z. Heuer (ihnp4!bentley!kwh), The Walking Lint > >Does anyone have an ANSI standard for where you're supposed to set your >tab stops? Determining "amount of indentation" from the whitespace >characters in the source isn't that straightforward. Try ordering >these sequences of leading white space (presumed to be preceeded by >a newline or the beginning of the file, and followed by a statement) >by "amount of indentation", without having to supply information >to the compiler about what kind of terminal the source was written for >(which isn't usually, of course, the same as the terminal, if any, you >are running the compilation from): [ examples deleted ] Correct me if I'm wrong, but I was under the impression that UN*X tabs are at columns 1,9,17,25 etc and that this is not recommended, but in fact *required* to get anywhere (e.g. ls emits tabs ). If your terminal doesn't have tabs or has "wrong" tabs, the terminal handler has ways and means of making it work (i.e. expanding tabs to spaces on their way to the terminal ). So if your terminal has tabs but they are "wrong", and you do not enable tab-expansion, you will suffer from inconsistency between the physical appearance of your screen and the system's idea of its appearance. In the very least, you won't be able to delete tabs properly. >Your terminal's tabs ARE set at column (left edge = column 1) 7, 15, 30, >and 72, aren't they? :-) :-) indeed. > >Do tabs expand relative to the edge of the terminal, or the edge of the >window the compiler is running in? What happens if the window changes >during compilation? > The same thing that happens if you move your terminal 2 inches to the left during compilation. If you have windows which can move left and right, then obviously the terminal's physical tabs cannot be used as the places where the cursor stops when you hit ( although they may still be used for cursor positioning ). -- "We demand rigidly defined areas of doubt and uncertainty!" - Vroomfondel ---------------------------------------------------------------------- Greg Smith University of Toronto UUCP: ..utzoo!utcsri!greg