home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / ada / 3794 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.8 KB  |  52 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!aplcen.apl.jhu.edu!ddsdx2.jhuapl.edu!dlc
  3. From: dlc@ddsdx2.jhuapl.edu (Dave Collard x7468)
  4. Subject: Re: I/O and the LRM
  5. Message-ID: <1992Dec21.182000.25255@aplcen.apl.jhu.edu>
  6. Keywords: I/O NAME OPEN
  7. Sender: news@aplcen.apl.jhu.edu (USENET News System)
  8. Organization: Johns Hopkins University
  9. References: <206@hathor.CSS.GOV> <1992Dec21.163435.22675@software.org>
  10. Distribution: usa
  11. Date: Mon, 21 Dec 92 18:20:00 GMT
  12. Lines: 38
  13.  
  14. In <1992Dec21.163435.22675@software.org> smithd@software.org (Doug Smith) writes:
  15.  
  16. >In article <206@hathor.CSS.GOV> jeffe@hathor.CSS.GOV (Jeff Etrick) writes:
  17. >> 
  18. >> 
  19. >>  The following is taken from the LRM:
  20. >> 
  21. >> >>function NAME(FILE : in FILE_TYPE) return STRING;
  22. >> 
  23. >> >>Returns a string which uniquely identifies the external file currently
  24. >> >>associated with the given file (and may thus be used in an OPEN
  25. >> >>operation).  If an environment allows alternative specifications of the
  26. >> >>name (for example, abbreviations), the string returned by the function
  27. >> >>should correspond to a full specification of the name.
  28. >> 
  29. >> >>The exception STATUS_ERROR is raised if the given file is not open.
  30. >> 
  31. >> 
  32. >>  I have used the function successfully many times to get the external
  33. >> name of a currently opened file but what I don't understand is the
  34. >> comment about it being used in an open statement. Why would I want to use
  35. >> this statement in an open since the file must already be opened or
  36. >> STATUS_ERROR will be raised.
  37. >> 
  38. >> Thanks for the help,
  39. >> 
  40. >> Jeff
  41.  
  42. A file can be opened more than once.
  43.  
  44. For example, to write sequential data to standard out:
  45.  
  46.   CHSEQ.Create(SysOutfile, CHSEQ.Out_File, Text_IO.Name(Text_IO.Standard_Output));
  47.  
  48. A file can be opened with shared access, at least on some systems, by
  49. using the write FORM parameter.
  50.  
  51. --Thor
  52.