Re: interface blocks
- From: "Lynn McGuire" <nospam@xxxxxxxxxx>
- Date: Thu, 25 Aug 2005 14:50:47 -0500
>> I have about 3500 subroutines with 400,000 lines of f66/f77 that I am
>> porting to use IVF 9.0. I am considering building a generic interface
>> block with all 3500 subroutines in order to ensure that we are not
>> having argument problems (number of and/or data type). I have been
>> told that this might be a bad idea. Why ?
>
> Um. I think you are confusing some terminology.. because that doesn't
> even make sense.... at least not with the word "generic" in there. You
> just mean an interface block rather than a generic one, right? An
> interface block at least makes sense, but a generic one doesn't.
I get terminology confused every day. I meant an interface block for
every subroutine that we have to include. The interface block would
hold the prototype for all subroutines.
> I'd say not so much that doing interface bodies is a bad idea as that
> doing other things (module procedures) is better. Interface bodies can
> give you a false sense of security. To me, one of the big problems with
> interface bodies is that they are usually *NOT* checked against the
> actual procedure. You get checking that the call is compatible with the
> interface body, but what you really wanted was checking that the call is
> compatible with the procedure. Where before, you had only 2 places that
> needed to be compatible (the call and the procedure), you now have 3
> (the call, the procedure, and the interface body). In some ways, this
> overstates the problem, because you only have one interface body per
> procedure, while you presumably have multiple calls. Still, that's the
> crux of the issue.
Well, that is no good. If the prototype is not checked against the actual
subroutine then all is out the door.
> Oh, and there are various annoyances in terms of writing the interface
> bodies correctly, but those are more annoyances than real reasons not to
> do it. Most notable is the mess with interface bodies not getting host
> association. In 99+% of the cases, that just means you have to remember
> the extra trick. In a few special cases, it turns out to be quite hard
> to do at all without a hack introduced in f2003. One is likely to just
> give up on those instead.
So an interface block is not the same thing as an function prototype
in C/C++ ? If so, bummer.
Thanks,
Lynn
.
- Follow-Ups:
- Re: interface blocks
- From: Richard E Maine
- Re: interface blocks
- References:
- interface blocks
- From: Lynn McGuire
- Re: interface blocks
- From: Richard E Maine
- interface blocks
- Prev by Date: TYPE *, SYSTEM executable statement
- Next by Date: Re: interface blocks
- Previous by thread: Re: interface blocks
- Next by thread: Re: interface blocks
- Index(es):
Relevant Pages
|
|