home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4709 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!draco.macsch.com!convex.is.macsch.com!dnl
  3. From: dnl@convex.is.macsch.com (David Lombard)
  4. Subject: Re: Variable-sized square matrices
  5. Message-ID: <1992Dec15.010255.25793@draco.macsch.com>
  6. Sender: usenet@draco.macsch.com (Usenet Poster)
  7. Organization: MacNeal-Schwendler Corp.
  8. References: <1992Dec11.000919.1@camins.camosun.bc.ca>
  9. Date: Tue, 15 Dec 92 01:02:55 GMT
  10. Lines: 26
  11.  
  12. In article <1992Dec11.000919.1@camins.camosun.bc.ca> alumni107@camins.camosun.bc.ca writes:
  13. >I am working with a set of functions that operate on variable-sized
  14. >square matrices. Currently, I pass a one-dimensional array to these
  15. >functions filled/accessed in the order that a 2D array would be
  16. >filled. Is this portable and safe ? 
  17. >
  18. >Alternately, I could modify all the functions to accept square 
  19. >matrices of a fixed size, with an additional parameter to specify the 
  20. >current size. 
  21. >
  22.  
  23. Either one is portable and safe.  I much prefer the first because of the space
  24. savings and the need to only store the actual `dimensions' of the matrix (as
  25. opposed to a `leading dimension' too).  But, if you need to work with the
  26. arrays in the callers of the functions, the latter may be preferred.
  27.  
  28.  
  29.  
  30. Regards,
  31. DNL
  32.  
  33.                  MY_COMMENTS = MY_OPINIONS = NOBODY_ELSES;
  34.  
  35. David N. Lombard    The first thing we do,         The MacNeal-Schwendler Corp
  36. dnl@macsch.com      Let's kill all the lawyers.    815 Colorado Blvd
  37. (213) 259-4911      II Henry VI, IV.ii             Los Angeles, CA  90041
  38.