Hi,
I am a little out of loop on IO in Fortran, so two simple questions:
I gather the scope of UNIT numbers is global per process, meaning once I
OPEN unit #100 in a process, this unit is available globally (without
regard to any scope like for variables) inside a program (a process
under UNIX, even if multithreaded), so that one needs to be careful
about finding available unit numbers. Is this correct? Can someone at
least briefly explain to me why this system was made, instead of the
OPEN or other statements explicitly returning a UNIT without the user
having to enter one (like FILE pointers in C).
Also, is there a way to write to something like /dev/null under
UNIX (i.e. fake IO)? With scratch files the actual IO still happens--I
want to ignore all WRITEs to a given UNIT.
Thanks and Happy New Year to everyone,
Aleksandar
--
__________________________________
Aleksandar Donev
Complex Materials Theory Group (http://cherrypit.princeton.edu/)
Princeton Materials Institute & Program in Applied and Computational Mathematics
@ Princeton University
Address:
419 Bowen Hall, 70 Prospect Avenue
Princeton University
Princeton, NJ 08540-5211
E-mail: [log in to unmask]
WWW: http://atom.princeton.edu/donev
Phone: (609) 258-2775
Fax: (609) 258-6878
__________________________________
|