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

  1. Xref: sparky comp.lang.c:20219 comp.lang.fortran:5187
  2. Newsgroups: comp.lang.c,comp.lang.fortran
  3. Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!gatech!hubcap!ncrcae!ncrhub2!ncrgw2!psinntp!uaisun4!mrl
  4. From: mrl@uai.com (Mark R. Ludwig)
  5. Subject: Re: calling a Fortran subroutine from a C program
  6. In-Reply-To: ig25@fg30.rz.uni-karlsruhe.de's message of 26 Jan 93 15:12:09 GMT
  7. Message-ID: <MRL.93Jan26171359@hp.uai.com>
  8. Sender: news@uai.com
  9. Nntp-Posting-Host: hp.uai.com
  10. Organization: /etc/news/organization
  11. References: <1993Jan22.190624.23084@chpc.utexas.edu>
  12.     <1993Jan22.200839.8352@sol.ctr.columbia.edu>
  13.     <1993Jan22.233618.17814@chpc.utexas.edu>
  14.     <1993Jan23.152153.7178@biome.bio.ns.ca> <ig25.728061129@fg30>
  15. Distribution: na
  16. Date: 26 Jan 93 17:13:59
  17. Lines: 23
  18.  
  19. In article <ig25.728061129@fg30> ig25@fg30.rz.uni-karlsruhe.de (Thomas Koenig) writes:
  20.  
  21. |> An implementation might very well choose to start every character
  22. |> variable on a word boundary, for speed reasons.
  23. |>
  24. |>       CHARACTER*1 STRING(100)
  25. |>
  26. |> would then appear to C to be an array of ints, instead of chars.
  27.  
  28. No, the 77 standard requires that all characters of an array be
  29. contiguous.  
  30.  
  31. Below, either of these is required to be the same in terms of being 100
  32. contiguous character cells of memory.
  33.  
  34.         CHARACTER A*1(100), B*100
  35.  
  36. On Cray, because the machine is word-addressable, they will allocate
  37. each CHARACTER variable which is not associated with any other
  38. variable (by way of EQUIVALENCE or appearing in COMMON), starting in
  39. its own word.
  40.  
  41. I'll quote chapter and verse if you don't want to take my word for it.$$
  42.