home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / ada / 3849 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  1.4 KB

  1. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!ucbvax!NOSVE.ELAN.AF.MIL!mvensky
  2. From: mvensky@NOSVE.ELAN.AF.MIL
  3. Newsgroups: comp.lang.ada
  4. Subject: (none)
  5. Message-ID: <921230152122490-MTAAFFTC*mvensky@nosve.elan.af.mil>
  6. Date: 30 Dec 92 23:25:49 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 18
  10.  
  11. I am having a tiny problem with Ada's SEQUENTIAL_IO. I am currently writing
  12. a utility to process sequential tapes written by FORTRAN 77 routines. The record
  13. formats are very well described. However they are heterogeneous, that is they
  14. consist of one hollerith character, followed by an integer, followed by several
  15. more hollerith characters and terminated by a vector of reals, aka floats in Ada
  16. . How do I use Ada's strong typing to describe abstract data objects while
  17. reading in this file. If I read the data in using say a word-aligned vector of
  18. floats, I can do some unchecked conversion. This will work but does not seem to
  19. be very clean or elegant. Other possible declarations might cause the dreaded
  20. "DATA_ERROR" exception to be raised.
  21.  
  22. These records were originally written as unformatted FORTRAN writes. They will
  23. read, fortunately perhaps, by Ada written for the same machine (a Cyber).
  24.  
  25. I would truely appreciate any insight into how to solve this.
  26.  
  27.                                        Michael J. Vensky
  28.                                        Edwards Air Force Base
  29.