Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: fortran to C converter Message-ID: <10134@smoke.BRL.MIL> Date: 27 Apr 89 03:41:12 GMT References: <9244@alice.UUCP> <12716@lanl.gov> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 25 In article <12716@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >Yes. For example, why does C treat a carriage return as whitespace? >Nobody programs like that. Most people put _one_ statement per line, >so the use of _both_ semicolon and carriage return as statement terminators >seems redundant. Why does C choose to ignore the "wrong" one? I'll choose to treat this as an honest request for information.. I'll also assume you're taking about new-lines, not strictly CRs. Many programming environments work best when source file line lengths are limited, typically to no more than 80 characters (the exact useful limit varies). There are many instances in C coding when the natural expression of a simple statement (not talking about entire loops, etc., but rather things like expression statements) simply does not fit on a single line within such a length limit. This especially happens when 8-column tab stops are involved (which often is the best-supported or ONLY supported tab spacing), but it would occur even if one started every statement in the first position of a line. Therefore, allowing simple statements to span multiple lines is a practical convenience for the programmer. RatFor is an example of a language that attempted to support line spanning while simultaneously treating new-line as a statement terminator most of the time. It worked okay but was rather ad-hocish; a uniform simple rule such as C has seems better to me.