home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5142 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  1.5 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!lupa!corbett
  2. From: corbett@lupa.Eng.Sun.COM (Robert Corbett)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: dbx headache
  5. Date: 23 Jan 1993 03:18:01 GMT
  6. Organization: Sun
  7. Lines: 37
  8. Message-ID: <lm1e79INNbao@exodus.Eng.Sun.COM>
  9. References: <93021.234529MATOVICM@QUCDN.QueensU.CA>
  10. NNTP-Posting-Host: lupa
  11.  
  12. MATOVICM@QUCDN.QueensU.CA () writes:
  13. > I'm fed up with dbx (SGI, IRIX 3.3.2, IRIX 4.0.1) when debugging fortran
  14. > programs. Examining arrays is pain in a neck unless you deal with the
  15. > size a(3,3) or similar. Is there any way to say e.g.
  16. >   print a from 155 to 175 (and possibly to specify the increment).
  17. > Or, is there any other UNIX (public domain) debugger that can handle
  18. > arrays frinedly?
  19.  
  20. I can't help you for SGI equipment, but the dbx for SPARCstations
  21. provided in SPARCworks 2.0.1 appears to do exactly what you want.
  22.  
  23. The manual *Debugging a Program* states
  24.  
  25. Syntax for FORTRAN Array Slicing and Striding
  26.  
  27.      For each dimension of an array, the full syntax to the
  28.      print command to slice the array is:
  29.  
  30.      (debugger) print arr (exp1:exp2:exp3)
  31.  
  32.      where:
  33.  
  34.          exp1 = start_of_slice
  35.          exp2 = end_of_slice
  36.          exp3 = length_of_stride
  37.             (the number of elements skipped is exp3 - 1)
  38.  
  39.     For an n-dimensional slice, separate the definition of each
  40.     slice with a comma:
  41.  
  42.     (debugger) print arr (exp1:exp2:exp3, exp1:exp2:exp3,...)
  43.  
  44. The manual goes on to explain how the elements are laid out in storage,
  45. and convenient shorthand notations.
  46.  
  47.                     Yours truly,
  48.                     Robert Corbett
  49.