Path: utzoo!utgpu!attcan!uunet!wuarchive!cs.utexas.edu!ut-emx!walt.cc.utexas.edu!lihan From: lihan@walt.cc.utexas.edu (Bruce Bostwick) Newsgroups: comp.lang.pascal Subject: Re: Indenting Message-ID: <19038@ut-emx.UUCP> Date: 1 Oct 89 02:12:20 GMT References: <89273.161831TRM900@PSUVM.BITNET> <89273.185750TBC101@PSUVM.BITNET> Sender: news@ut-emx.UUCP Reply-To: lihan@walt.cc.utexas.edu (Bruce Bostwick) Organization: UT-Austin, Texas Lines: 46 In article <89273.185750TBC101@PSUVM.BITNET> TBC101@PSUVM.BITNET (Thomas B. Collins, Jr.) writes: >I would of taken off points for not using lowercase text (a pet peeve of >mine), and also for the fact that a begin and end bracket a single >statement (after the IF). Then again, this is my opinion, and if your >teacher is adamant about the form you should follow, I'd say conform to >their form, but revert to yours when you've finished the class. I never have liked to use uppercase -- reminds me too much of my BASIC days. I also have never included my begin's and end's in the indentation, though this is purely a stylistic point. For anyone who's interested, and those who might want to put forth a standard for this sort of thing, I use the following rules for indentation: 1) Everything that's either between begin and end or dependent on an if gets indented three spaces 2) All the stuff included in a record goes three spaces RIGHT of the start of the word 'record' and its 'end' is aligned with it 3) var, type, and const declarations all line up with the first declaration in the category, i.e.: var noid:integer; dfile:file; scrunge:record a,b,c:string[32]; end; begin statement(x,y); end. I use some others too but can't remember them offhand and don't wish to hog bandwidth trying to recall them. They seem to make the program quite easy to read, and I haven't had to make an exception yet. ======================================================================= Internet:lihan@walt.cc.utexas.edu Disclaimer: My employer doesn't MaBellNet:(512)459-1602 even know UseNet exists, let SlowNet:varies chaotically, alone that I'm on it and ex- e-mail for current value pressing opinions ... +---------------------------------------------------------------------+ (-: a.k.a. BB/CIV :-) =======================================================================