🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.fortran
1 messages
1 total messages Started by Ravinder Bhumbla Wed, 27 Jan 1993 08:41
Comments in input files (not source code)?
#4512
Author: Ravinder Bhumbla
Date: Wed, 27 Jan 1993 08:41
31 lines
1695 bytes
How would one go about writing a program that would understand a `$'
in a data file to be a comment character and would skip to the next
line as soon as it encountered it?  That would enable you to document
input data nicely.  I can't think of a simple way to do it.  Please
forgive me if this is an RTFM question but my Fortran book did not
have any suggestion.

The only way I have been doing it so far is to add information at the
end of each line where my program does not expect any data to be.  For
example I could have the following source code:
	...
	read(7,*) abc, ijk, def
	read(7,*) nnn, rrr
	...

and the input file would be:
	...
	10.0 5 25.6  These are values for abc, ijk, def
	235 22.5     These are values for nnn, rrr
	...

But this does not let me put comments at arbitrary places in the input
data.  Could you please let me know what techniques you use to add
comments to your input data files?  Please e-mail directly to me and
I'll post a summary if I get any positive responses.

Thanks,
Ravi

--
Ravinder Bhumbla	rbhumbla@ucsd.edu    U. of California, San Diego
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads