home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 12968 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1020 b 

  1. Path: sparky!uunet!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!cwi.nl!dik
  2. From: dik@cwi.nl (Dik T. Winter)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: c<->fortran
  5. Message-ID: <7183@charon.cwi.nl>
  6. Date: 30 Aug 92 12:22:38 GMT
  7. References: <1992Aug30.112532.11192@cs.hw.ac.uk>
  8. Sender: news@cwi.nl
  9. Organization: CWI, Amsterdam
  10. Lines: 19
  11.  
  12. In article <1992Aug30.112532.11192@cs.hw.ac.uk> suthan@cs.hw.ac.uk (Manickam Umasuthan) writes:
  13.  > Dear Netters,
  14.  > I tried the following piece of code which interfaces with a fortran routine
  15.  > which in turn uses the EXTERNAL statement and the external function is defined
  16.  > in C. But in my machine the output is wrong. I like to know where the error
  17.  > is.
  18. Try the following change:
  19.  >     subroutine  start(fname,x)
  20.  >     EXTERNAL fname
  21.  >     real x
  22. add:    double precision fname
  23.  >     print*, fname(x)
  24. change this to:
  25.     print *, fname(dble(x))
  26.  >     END
  27. -- 
  28. dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland
  29. home: bovenover 215, 1025 jn  amsterdam, nederland
  30. dik@cwi.nl
  31.