Re: directory listing
"fj" <francois.jacq@xxxxxxx> wrote in message
news:1188338937.234057.70310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 28 août, 22:23, gokha...@xxxxxxxxx wrote:
Hello:
Is there a way to obtain a list of files having a specified extension
using Fortran /Intel Fortran 9.1?
Thanks,
-Nachiket
Using the specific Intel library is OK but a "more portable" way
consists in calling the routine SYSTEM available with most compilers.
But it remains necessary to test the operating system :
CHARACTER(10) :: extension="f90"
CHARACTER(255) :: cfile
IF(os == "unix") THEN
CALL system('ls -1 -p *.'//TRIM(extension)//'> list')
ELSE
CALL system('dir /b/ad/on *.'//TRIM(extension)//'> list')
ENDIF
Or for those compilers where SYSTEM is a function not a subroutine
ivalue = system( ... )
Les
.
Relevant Pages
- Re: Is it time to legitimise REAL*8 etc?
... Some vendors phased out their F77 compilers over 10 ... No need to support a seperate F77 compiler as, ... experience with F77) that the F95 programming is safer than the F77 ... Authors are not chosing more recent Fortran ... (comp.lang.fortran) - Re: what is the most suitable Linux platform for Programmers and software developers
... C, C++, Perl, Python, Lisp, and a bunch of other languages are supported ... There are FORTRAN compilers, but FORTRAN ... Look at the Linux ... (comp.os.linux.misc) - Re: Is it time to legitimise REAL*8 etc?
... Some vendors phased out their F77 compilers over 10 ... No need to support a seperate F77 compiler as, ... experience with F77) that the F95 programming is safer than the F77 ... COMMONs remain available with any FORTRAN version. ... (comp.lang.fortran) - Declaration to get 8-bit (or 16-bit) integer?
... Supported by all the current compilers that I've tried it on. ... Not likely to become standard in the foreseeable future. ... Syntax standard-conforming, but semantics not guaranteed of course. ... The meaning of the code not obvious to anyone but a Fortran guru. ... (comp.lang.fortran) - Re: Casting malloc
... If he can make a strong case for the diagnostics, ... Uh, again, Fortran is a better tool for some sorts of work. ... familliar what Fortran compilers only in the code they generate; ... Given a variety of hard problems, Fortran consistently came up much faster with default code and no explicit optimizations. ... (comp.lang.c) |
|