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

  1. Xref: sparky comp.lang.c:20106 comp.lang.fortran:5144
  2. Newsgroups: comp.lang.c,comp.lang.fortran
  3. Path: sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!michael
  4. From: michael@chpc.utexas.edu (Michael Lemke)
  5. Subject: Re: calling a Fortran subroutine from a C program
  6. Message-ID: <1993Jan23.053042.1946@chpc.utexas.edu>
  7. Organization: The University of Texas System - CHPC
  8. References: <1993Jan22.233618.17814@chpc.utexas.edu> <1993Jan23.025835.16538@sol.ctr.columbia.edu>
  9. Date: Sat, 23 Jan 93 05:30:42 GMT
  10. Lines: 45
  11.  
  12. In article <1993Jan23.025835.16538@sol.ctr.columbia.edu> bobp@msi.com (Bob Pitha) writes:
  13. >Michael Lemke (michael@chpc.utexas.edu) wrote:
  14. >: To make it really clear:  The difference is
  15. >
  16. >:     CHARACTER*100 STRING
  17. >
  18. >: or
  19. >
  20. >:     CHARACTER*1 STRING(100)
  21. >
  22. >: which are very different data structures.   The latter is an array, the
  23. >: first is a single variable.  I don't care how C chews its memory, it can
  24. >: hardly distinguish these two cases.  The last is pretty close in
  25. >: functionality to C's concept (except for having a length stored
  26. >: somewhere) as you'd need something like strcpy to copy data.
  27. >
  28. >  Of course they're different in FOrtran; you could hardly do the
  29. >following:
  30. >      character*1 string (100)
  31. >
  32. >      string = "blahblahblah"
  33. >
  34. >  But that wasn't my point.  My point was, I was talking about passing
  35. >an *array or characters* from C.  Rather than write "array or characters"
  36.                           ^^^^
  37. Alright, then your definition is ok.  
  38.  
  39. >I wrote "character array"; but I was not talking about a Fortran array
  40. >of strings.  
  41.  
  42. But I also recall you talked about Fortran blank-filling character
  43. arrays.
  44.  
  45. >I read the question origianlly in comp.lang.c, and in c
  46. >the ambiguity does not exist.  I'm sorry if I confused you.  I think
  47. >we both know what I meant and what you mean, so let's just leave it.
  48.  
  49. Yes, we do.  I was only concerned about those people who read this and 
  50. will become confused.
  51.  
  52. Michael
  53. -- 
  54. Michael Lemke
  55. Astronomy, UT Austin, Texas
  56. (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
  57.