fortran to C converter

Liber nevin1 at ihlpb.ATT.COM
Sat Apr 29 09:31:58 AEST 1989


In article <12716 at lanl.gov> jlg at lanl.gov (Jim Giles) writes:
>Most people put _one_ statement per line,

No.  Most people put AT MOST one statement per line.  Many times, due
to indentation, long variable names, etc., it is not possible to put a
whole statement on just one line.  Heck, even your beloved FORTRAN
allows you to split lines (a minus sugn in the sixth column, I
believe).

>so the use of _both_ semicolon and carriage return as statement terminators
>seems redundant.

That's why carriage returns AREN'T statement terminators.

>Why does C choose to ignore the "wrong" one?

Using carriage returns as statement terminators leads to much trickier
rules for line continuation.  For example:  is

	x = 1
	-y

one statement or two?  It's not obvious which should be better (please,
let's NOT debate it).

	[insert Sousa march here, and roll the credits :-)]
-- 
 _ __	NEVIN ":-)" LIBER  nevin1 at ihlpb.ATT.COM  (312) 979-4751  IH 4F-410
' )  )			 "I will not be pushed, filed, stamped, indexed,
 /  / _ , __o  ____	  briefed, debriefed or numbered!  My life is my own!"
/  (_</_\/ <__/ / <_	As far as I know, these are NOT the opinions of AT&T.



More information about the Comp.lang.c mailing list