Comments (3)
"Modern fortran explained" (Metcalf et al., 2011) lists descriptions of the dummy variables of the inquire
statement. I didn't read everything, but this is probably the entry you're looking for:
named=nmd and name= nam, where nmd is a logical variable that is assigned the value
true if the file has a name, and false otherwise. If the file has a name, the character
variable nam will be assigned the name. This value is not necessarily the same as that
given in the file specifier, if used, but may be qualified in some way. However, in
all cases it is a name which is valid for use in a subsequent open statement, and so
the inquire can be used to determine the actual name of a file before connecting it.
Whether the file name is case sensitive is system dependent
It migh tbe worth adding the iomsg
dummy variable to both the open
and the inquire
procedures, and print iomsg
if istat /= 0
.
from pyplot-fortran.
Tried to use the STATUS='SCRATCH'
feature of the OPEN
statement. However, it doesn't appear to be possible to get the name of the file with gfortran. For example:
program Test
implicit none
integer :: istat,iunit
character(len=256) :: fname
open(newunit=iunit,status='SCRATCH',iostat=istat)
inquire(unit=iunit,name=fname,iostat=istat)
write(*,*) 'name = '//trim(fname)
end program Test
When compiled with gfortran, fname
is just garbage. Might be a bug? It works on ifort. Will look into it some more.
from pyplot-fortran.
And this is the explanation of the status
argument:
status
= st, where st is a character expression that provides the valueold
,new
,replace
,
scratch
, orunknown
. Thefile
= specifier must be present if new or replace is
specified or if old is specified and the unit is not connected; thefile
= specifier must
not be present if scratch is specified.
(...)
If the valuescratch
is specified, the file is created and becomes
connected, but it cannot be kept after completion of the program or execution of a
close statement.
I suppose this all makes sense: a scratch file does not have to be accessible though a filename by the OS.
from pyplot-fortran.
Related Issues (20)
- str variable cannot hold big data set HOT 5
- pyplot-fortran on Raspberry Pi
- Use OO interface HOT 3
- Fortran lexer in ed?
- Add plot_surface
- useOffset
- Raw string literals in labels and titles HOT 4
- dpi
- travis-ci seems to be broken HOT 1
- Calling gca() with keyword arguments was deprecated in Matplotlib 3.4
- Error: Missing actual argument for argument βistatβ
- Add option to specify the real kind
- Visual Studio 2019 HOT 4
- Issues with conversion of passed array to `color` in `add_plot` HOT 3
- About 3d plot and meshgrid HOT 1
- Request for wireframe
- checking for python3 HOT 1
- add topics
- ValueError: 'xerr' must not contain negative values HOT 2
- question of debugging HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyplot-fortran.