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

  1. Xref: sparky comp.lang.c:20077 comp.lang.fortran:5126
  2. Newsgroups: comp.lang.c,comp.lang.fortran
  3. Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
  4. From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
  5. Subject: Re: calling a Fortran subroutine from a C program
  6. References: <1jmqdaINN11g@mudhoney.mathcs.emory.edu> <1993Jan22.130743.27130@sol.ctr.columbia.edu>
  7. Message-ID: <C19LFE.AL2@news.cso.uiuc.edu>
  8. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  9. Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
  10. Organization: MRL - UIUC
  11. Date: Fri, 22 Jan 1993 16:49:59 GMT
  12. Lines: 21
  13.  
  14. In article <1993Jan22.130743.27130@sol.ctr.columbia.edu>, bobp@msi.com (Bob Pitha) writes:
  15. |>Scott White (swhite@mathcs.emory.edu) wrote:
  16. |>: Also, the called Fortran routine takes variables which are arrays as 
  17. |>: parameters.  And, I looked and saw that the subscripts start at 1, whereas in
  18. |>: C they start at zero.  That's no problem is it (an address is an address):
  19. |>
  20. |> No, it's no problem, assuming you remember it everywhere.  It only makes
  21. |>it a bit easier to make one of those annoying off-by-one subscript errors!
  22.  
  23. Perhaps not everybody is familiar with the fact that you can have the 
  24. indexes matching by declaring, for example,
  25.     real*8 array(0:99)
  26. in the Fortran program.
  27.  
  28. --
  29. furio ercolessi    <furio@uiuc.edu>*    <furio@sissa.it>+
  30. * materials research lab, uni illinois at urbana-champaign
  31. + intl school for advanced studies, trieste, italy   
  32.  
  33. "Change nothing and continue with immaculate consistency"
  34.                                       [ Brian Eno, "Oblique Strategies" ]
  35.