fortran to C converter

RAMontante bobmon at iuvax.cs.indiana.edu
Thu Apr 27 09:25:02 AEST 1989


jlg at lanl.gov (Jim Giles) <12716 at lanl.gov> :
-
-Yes. For example, why does C treat a carriage return as whitespace?
-Nobody programs like that.  Most people put _one_ statement per line,

You've just convinced me that you don't know what you're talking about.
The number of statements per line is just an incidental artifact.  If people thought their statements ended at the carriage return, you'd either have BASIC's notion of a namespace, or lines that look like this.

I used to know FORTRAN programmers who programmed like this; they also
generated spaghetti code routinely, stopped dead in column 72, had never met
the concept of indentation, and thought that whitespace was unManly.

I often put one statement per line when I program in C, because I often
write trivial programs.  But if I have to indent things to any extent, or
use descriptive names, or call a subroutine that has a number of
arguments... I have to indent.  To say nothing of compound statements, like

			for (z_axis = 0; z_axis < MAX_z; z++)
			{
				/*
				 * 32 lines of operations...
				 */

			}	/* end of _one_ compound statement */


-so the use of _both_ semicolon and carriage return as statement terminators
-seems redundant.  Why does C choose to ignore the "wrong" one?

Just what exactly do you think is the "wrong" statement terminator here?


-And, of course, THANKS.  Now I can claim to have been actually flamed by
-Dennis Ritchie HIMSELF on _two_ occasions!  8-)

And now you've been flamed from the other end of the spectrum  :-)



More information about the Comp.lang.c mailing list