Re: INTERFACE problem
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Sun, 03 Apr 2005 14:48:14 -0700
Richard Maine wrote:
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> writes:
From C.9.4 it seems thatwithout an INTERFACE Fortran 77 array passing rules still apply.
I don't think we are communicating very well.
I assumed that you understood how it wworks, but I begin to suspect that the reason your posts on it might be misleading is perhaps that you don't actually understand it fully.
Those same rules also apply *WITH* an interface, provided that the interface describes what I might call f77-like arrays (explicit shape or assumed size). Having an explicit interface makes *NO* difference at all. What matters is what the dummy arrays are like. If the dummy arrays look like f77 ones, then you will get f77-style passing no matter whether you have an explicit interface or not.
I think I understood that, but the reference to Fortran 77 rules was meant to include passing an array element to an array dummy, and passing arrays with different rank than the dummy, both of which are somewhat unusual. (Well, you can pass to different rank in C, and pass the address of an array element, too.) Those pretty much just happen if you pass arrays and array elements by address only.
Also, the statement above "without an INTERFACE ..." was not meant to exclude the case with an INTERFACE, but just to be sure that all the old rules still apply in the no INTERFACE case. I didn't find the two cases mentioned, one way or the other, in the Sept. 2002 draft, but they are in the 77 standard, and the draft seems to indicate that Fortran 77 rules apply without an INTERFACE. (As you say, maybe not exclusively.)
I won't argue that those methods should be used, only that it seems that they are legal. Well, in addition to the discussion here there is a discussion on comp.arch.arithmetic on the ability to do bounds checking in different languages, and with different calling conventions. C and Fortran came up in the discussion because some of these are legal, yet could confuse the ability to do bounds checking.
-- glen
.
- Follow-Ups:
- Re: INTERFACE problem
- From: Richard E Maine
- Re: INTERFACE problem
- References:
- Re: INTERFACE problem
- From: glen herrmannsfeldt
- Re: INTERFACE problem
- From: Richard E Maine
- Re: INTERFACE problem
- From: glen herrmannsfeldt
- Re: INTERFACE problem
- From: Richard Maine
- Re: INTERFACE problem
- Prev by Date: Re: Similarity searching
- Next by Date: Re: Q: Cray Pointers Redux
- Previous by thread: Re: INTERFACE problem
- Next by thread: Re: INTERFACE problem
- Index(es):
Relevant Pages
|