home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / fortran / 3014 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.5 KB  |  32 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!timbuk.cray.com!walter.cray.com!ferris!gerardo
  3. From: gerardo@ferris.cray.com (Gerardo Cisneros)
  4. Subject: Re: WILDCARD expansion in UNIX FORTRAN
  5. Message-ID: <1992Aug13.101155.26123@walter.cray.com>
  6. Organization: Cray Research, Inc.
  7. References: <1992Aug13.125538.13533@nsisrv.gsfc.nasa.gov>
  8. Distribution: na
  9. Date: 13 Aug 92 10:11:54 CDT
  10. Lines: 20
  11.  
  12. In article <1992Aug13.125538.13533@nsisrv.gsfc.nasa.gov> schieb@shark.gsfc.nasa.gov (Brian D. Schieber) writes:
  13. > I'm porting a VAX FORTRAN program to UNIX that uses VAX library
  14. >calls to expand a wildcard for filenames into an array of strings.
  15. >Is there any such capability for UNIX FORTRAN? Short of doing
  16. >a SYSTEM call and running 'find' I don't know how this would be
  17. >done.
  18.  
  19. Where are you expecting the wildcard to come from?  Wildcards in command
  20. lines are expanded by the shell, so the program gets an array of pointers to
  21. strings.  If you need wildcard expansion within the program and your Fortran
  22. library does not have extensions supporting this, you could interface to
  23. the system and C-library functions getdirentries(2), opendir(3), readdir(3),
  24. telldir(3), seekdir(3), rewinddir(3), closedir(3) and scandir(3), where
  25. (2) and (3) refer to sections 2 (System calls) and 3 (Library functions) of 
  26. the Unix manual.
  27. -- 
  28. Dr. Gerardo Cisneros        |Cray Research de M'exico, S.A. de C.V.
  29. gerardo.cisneros@cray.com    |Camino a Sta. Teresa 480-A #302
  30. (+52+5)622-8584            |14020 Tlalpan, D.F., MEXICO
  31.  Anything I said sound like an opinion? Then it's no one's but my own.
  32.