🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4512

Comments in input files (not source code)?

#4512
From: 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
Technical Details
Message-ID: <44077@sdcc12.ucsd.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!uwm.edu!spool.mu.edu!agate!dog.ee.lbl.gov!news!network.ucsd.edu!sdcc12!sdcc15!am299bv

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!uwm.edu!spool.mu.edu!agate!dog.ee.lbl.gov!news!network.ucsd.edu!sdcc12!sdcc15!am299bv
From: am299bv@sdcc15.ucsd.edu (Ravinder Bhumbla)
Newsgroups: comp.lang.fortran
Subject: Comments in input files (not source code)?
Message-ID: <44077@sdcc12.ucsd.edu>
Date: 27 Jan 93 08:41:31 GMT
Sender: news@sdcc12.ucsd.edu
Reply-To: rbhumbla@ucsd.edu (Ravinder Bhumbla)
Followup-To: poster
Organization: University of California, San Diego
Lines: 31
Nntp-Posting-Host: sdcc15.ucsd.edu