home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20106 comp.lang.fortran:5144
- Newsgroups: comp.lang.c,comp.lang.fortran
- Path: sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!michael
- From: michael@chpc.utexas.edu (Michael Lemke)
- Subject: Re: calling a Fortran subroutine from a C program
- Message-ID: <1993Jan23.053042.1946@chpc.utexas.edu>
- Organization: The University of Texas System - CHPC
- References: <1993Jan22.233618.17814@chpc.utexas.edu> <1993Jan23.025835.16538@sol.ctr.columbia.edu>
- Date: Sat, 23 Jan 93 05:30:42 GMT
- Lines: 45
-
- In article <1993Jan23.025835.16538@sol.ctr.columbia.edu> bobp@msi.com (Bob Pitha) writes:
- >Michael Lemke (michael@chpc.utexas.edu) wrote:
- >: To make it really clear: The difference is
- >
- >: CHARACTER*100 STRING
- >
- >: or
- >
- >: CHARACTER*1 STRING(100)
- >
- >: which are very different data structures. The latter is an array, the
- >: first is a single variable. I don't care how C chews its memory, it can
- >: hardly distinguish these two cases. The last is pretty close in
- >: functionality to C's concept (except for having a length stored
- >: somewhere) as you'd need something like strcpy to copy data.
- >
- > Of course they're different in FOrtran; you could hardly do the
- >following:
- > character*1 string (100)
- >
- > string = "blahblahblah"
- >
- > But that wasn't my point. My point was, I was talking about passing
- >an *array or characters* from C. Rather than write "array or characters"
- ^^^^
- Alright, then your definition is ok.
-
- >I wrote "character array"; but I was not talking about a Fortran array
- >of strings.
-
- But I also recall you talked about Fortran blank-filling character
- arrays.
-
- >I read the question origianlly in comp.lang.c, and in c
- >the ambiguity does not exist. I'm sorry if I confused you. I think
- >we both know what I meant and what you mean, so let's just leave it.
-
- Yes, we do. I was only concerned about those people who read this and
- will become confused.
-
- Michael
- --
- Michael Lemke
- Astronomy, UT Austin, Texas
- (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
-