From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e859f774bbb3dfb3 X-Google-Thread: 1094ba,40d8c5edfa36ea47 X-Google-Attributes: gid103376,gid1094ba,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!news.netcologne.de!newsfeed-fusi2.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: nospam@see.signature (Richard Maine) Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: another way to shoot yourself in the foot? Date: Thu, 10 Jul 2008 14:22:14 -0700 Message-ID: <1ijv8ls.e6j4wyvizlw0N%nospam@see.signature> References: <54157920-377a-441b-9b0b-f0c4f9ddffec@f36g2000hsa.googlegroups.com> <54435596-5e7f-4686-a2b7-1e22d7c4b186@p25g2000hsf.googlegroups.com> <_wPbk.7600$L_.4566@flpi150.ffdc.sbc.com> <1ijtbxq.1t7i71w700eykN%nospam@see.signature> X-Trace: individual.net VvWEC/EjBuEuZHDcVf9cNwWohoXdGBSdvF6cfCUAuwMSHLglCy X-Orig-Path: nospam Cancel-Lock: sha1:/SsDUFW+Bw1s+djUiQ+/uuGHxPU= User-Agent: MacSOUP/2.8.2 (Mac OS X version 10.5.4 (x86)) Xref: g2news1.google.com comp.lang.ada:1094 comp.lang.fortran:2604 Date: 2008-07-10T14:22:14-07:00 List-Id: Dick Hendrickson wrote: > James Giles wrote: > > Craig Powers wrote: > >> Is that actually possible without lying about an interface? i.e. Is > >> it possible to pass an INTENT(IN) dummy as an actual argument to a > >> more permissive dummy argument in another routine (no intent or > >> intent OUT) > > > > It's not permitted. The standard doesn't require implementations to > > verify that it's not done. That is, it's not one of the kinds of error > > that the standard requires implementations to detect and report. > > > You're partially wrong, James. It is permitted to pass a dummy > with INTENT(IN) to a subroutine that doesn't specify either > INTENT(INOUT) or INTENT(OUT). You can pass them to a subroutine > that doesn't specify intent and even potentially modifies > its argument. You can't lie in an interface, but you can > call routines that don't have an interface. Those routines are > required to do the right thing; but the compiler isn't required > to detect violations. I think you and James are saying the same thing. Your "those routines are required to do the right thing" translates to James' "it is not permitted [to do the wrong thing]". Both of you also say (correctly) that the compiler isn't required to catch such an error. And note that I think this is a diferent matter than the original question. I read the original question as "can you lie about the interface [presumably referring to separate compilation of an interface body and an external procedure]?" Presumably Craig was reading it differently because with my reading "can you do this without lying about an interface?" becomes a tautalogical (if that's a word) question. And I'll claim that this posting of mine doesn't count as replying to the thread I said I wouldn't post in, as I'm just replying to you three instead of to the pseudo-OP (pseudo because he wasn't literally the original, but he resurrected it as pretty much a new topic). -- Richard Maine | Good judgement comes from experience; email: last name at domain . net | experience comes from bad judgement. domain: summertriangle | -- Mark Twain