A question about comments

A question about comments

Old F77 code often has a great number of otherwise blank lines with 'C' in column 1, for spacing code.  I've even seen more recent code with '!' instead of 'C'.  This has always baffled me - why not just a blank line?  Is there a historic reason why this was needed?

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It's a hangover from Fortran 66, which, perhaps accidentally, considered a blank line to be the first line of a statement (and there is no concept of an "empty" statement).

Later standards specified it to be a comment line.

When Fortran 66 was invented, the Vietnam War was in full swing, Nixon was not president and one used punch cards.

You never use blank lines in punchcards you had to buy them.

Seat belt laws were just introduced, although the medical insurance industry fought them as they increased their costs. I was not out of elementary school and lithium was revolutionizing mental health and the prison population was a significant integer multiplier lower are the % of population. 

20 minutes on the Purdue computer is now equivalent to 3 seconds on a core I7 in one thread. 

The Beatles were all alive and talking and your grandmother probably still looked at men with interest. 

Ah the days when beer was 10 cents a glass and a small world had just opened and David Cassidy was cute.

 

If this makes no sense to you , go back to google and it will tell you everything. 

 

 

And finally Steve had not reached God status.

>>Ah the days when beer was 10 cents a glass

In my college days, there was one "locals" bar that sold 5 cent shorties (6oz glass).

>>20 minutes on the Purdue computer is now equivalent to 3 seconds on a core I7 in one thread

And probably had 1/1000th the memory and consumed 100x the watts of 3 phase power. (could be more depending on what Purdue had in those days). One of my workstations has 23 million times the amount of RAM that the lab computer had when I started programming.

Jim Dempsey

Quote:

jimdempseyatthecove wrote:

>>Ah the days when beer was 10 cents a glass

In my college days, there was one "locals" bar that sold 5 cent shorties (6oz glass).

>>20 minutes on the Purdue computer is now equivalent to 3 seconds on a core I7 in one thread

And probably had 1/1000th the memory and consumed 100x the watts of 3 phase power. (could be more depending on what Purdue had in those days). One of my workstations has 23 million times the amount of RAM that the lab computer had when I started programming.

Jim Dempsey

Jim:

10c Aussie was probably 5c USD.

No self respecting Aussie would stand in a pub and drink 6 oz, just not done. Cultural thing of course, but Aussies are hard drinkers.

Of course it is fun talking about beer drinking habits of other countries. I have been sinking a nice Sardinian beer in Bologna for the last 3 months, finally said to the bar guy, can I have a Heineken like on the sign, he said you are drinking it.  Heineken makes the Sardiinian Beer and I could not tell from the bottle.  All those tourists getting fooled. 

A young lady once said she could drink me under the table.  Did not go well, never ever did it again.

 

JOhn

Thanks Ian, although that doesn't really explain why some people are still using '!' blank lines.

Back then ... most of those CPU cycles were used for scientific computation.  These days, I'm guessing most are used for capturing, sending and displaying selfies.

This thread reminds me of a cute trick that we used when programs were punched on cards. We used to place WRITE statements in various places in the deck for debugging purposes. On the cards with these debug-writes, we would punch 'C' in column 80. When we no longer needed one or more of these debug-writes, rather than remove any cards from the deck, we would flip the corresponding cards to bring the 'C' to column 1. 

Quote:

gib wrote:

Thanks Ian, although that doesn't really explain why some people are still using '!' blank lines.

Some compilers I have used in the past have issued warnings over blank lines so the C or later ! in col 1 I guess became a habit for some.

Quote:

andrew_4619 wrote:

Quote:

gib wrote:

 

Thanks Ian, although that doesn't really explain why some people are still using '!' blank lines.

 

 

Some compilers I have used in the past have issued warnings over blank lines so the C or later ! in col 1 I guess became a habit for some.

Another reason is that some people do not like blank lines. Must be a Greek word for it. 

I still put in debug write statements and then use a ! to turn them off.  Saves time if a bug pops up again. 

Also it is nice in C# you can write o the debug screen which means that you do not have debug statements in the middle of the output.

Saw a T Shirt once -- Bend the punchcard - fool the machine. 

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today