home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20219 comp.lang.fortran:5187
- Newsgroups: comp.lang.c,comp.lang.fortran
- 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
- From: mrl@uai.com (Mark R. Ludwig)
- Subject: Re: calling a Fortran subroutine from a C program
- In-Reply-To: ig25@fg30.rz.uni-karlsruhe.de's message of 26 Jan 93 15:12:09 GMT
- Message-ID: <MRL.93Jan26171359@hp.uai.com>
- Sender: news@uai.com
- Nntp-Posting-Host: hp.uai.com
- Organization: /etc/news/organization
- References: <1993Jan22.190624.23084@chpc.utexas.edu>
- <1993Jan22.200839.8352@sol.ctr.columbia.edu>
- <1993Jan22.233618.17814@chpc.utexas.edu>
- <1993Jan23.152153.7178@biome.bio.ns.ca> <ig25.728061129@fg30>
- Distribution: na
- Date: 26 Jan 93 17:13:59
- Lines: 23
-
- In article <ig25.728061129@fg30> ig25@fg30.rz.uni-karlsruhe.de (Thomas Koenig) writes:
-
- |> An implementation might very well choose to start every character
- |> variable on a word boundary, for speed reasons.
- |>
- |> CHARACTER*1 STRING(100)
- |>
- |> would then appear to C to be an array of ints, instead of chars.
-
- No, the 77 standard requires that all characters of an array be
- contiguous.
-
- Below, either of these is required to be the same in terms of being 100
- contiguous character cells of memory.
-
- CHARACTER A*1(100), B*100
-
- On Cray, because the machine is word-addressable, they will allocate
- each CHARACTER variable which is not associated with any other
- variable (by way of EQUIVALENCE or appearing in COMMON), starting in
- its own word.
-
- I'll quote chapter and verse if you don't want to take my word for it.$$
-