home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sdd.hp.com!saimiri.primate.wisc.edu!ames!kronos.arc.nasa.gov!iscnvx!netcomsv!ulogic!hartman
- From: hartman@ulogic.UUCP (Richard M. Hartman)
- Newsgroups: comp.lang.c
- Subject: Re: The Correct Way To Write C if-Statements
- Message-ID: <628@ulogic.UUCP>
- Date: 18 Nov 92 00:25:13 GMT
- References: <1992Nov12.101654.21932@thunder.mcrcim.mcgill.edu> <1992Nov12.140710@gese.ge14.mdadv.gv.at> <3860@dozo.and.nl>
- Organization: negligable
- Lines: 44
-
- In article <3860@dozo.and.nl> jos@and.nl (Jos Horsmeier) writes:
- >In article <1992Nov12.140710@gese.ge14.mdadv.gv.at> sca@gese.ge14.mdadv.gv.at (Petzi Schweda) writes:
- >
- >Well, I think it was Dennis M. Ritchie himself who did this, although
- >I have seen BCPL programs, formatted like this. I find the Pascal like
- >indentation style just a funny looking as the C like style they used in
- >the book `Software Engineering in Pascal'. It goes something like this:
- >
- >if I = TRUE then begin
- > J:= J+1;
- > I= FALSE
- >end
- >
-
- The Grogono book (the standard when I learned this silly language)
- did this:
-
- IF index < maxwordlen
- THEN
- BEGIN
- index := index + 1;
- word[index] := currentchar
- END;
-
- ( redundant indentation! )
-
- When I actually used the language I did:
-
- if index < maxwordlen then
- begin
- index := index + 1;
- word[index] := currentchar;
- end;
-
- Look familiar?
-
- And we (C programmers) think we invented these arguments.... :)
-
- -Richard Hartman
- hartman@uLogic.COM
-
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Disco isn't dead... ...it's just in witness protection!
-
-