Re: internal procedure can't use array of derived type from main

From: Richard Maine (nospam_at_see.signature)
Date: 03/15/04


Date: 15 Mar 2004 11:01:15 -0800

hawk@slytherin.ds.psu.edu (Dr. Richard E. Hawkins) writes:

> So my solution is that I'm using an out where I should be using an inout

I had missed that one. Good catch by Mike. But watch out for another,
somewhat related, "gotcha". Looks to me like the internal procedure is
accessing the same variable both via argument association and via
host association. That is legal... but puts very serious limits on
what you can do with the variable... making intent(inout) simillarly
dubious, even if it happens to actually work for your immediate
application with the current compiler.

When you access the same data by argument association and by some
other method, that generally means that you aren't allowed to change
the value via either name. (Because temporary copies might be
involved, and this can cause problems with the copy and the
original getting different values. Well, in practice that's my
explanation for why it is illegal - the standard just says that it
is illegal.)

-- 
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain


Relevant Pages

  • Re: FBOFW, 1-10
    ... secretly wants to talk to Mike so the two can get to know each other ... Lotsa people watch TV socially, often with the sound down, or off or for the memory of the shared vicarious experience. ... If Mike would just unclinch his sphincter and "lower" himself enough to put himself in the other guy's shoes for a few of his precious as gold minutes he might do something wild and crazy like get to know and understand his father-in-law just a bit better. ... Oh, and if any of the above gets Ms. Manners' nose out of joint, well she can bite my spotty bottom (Though, I wouldn't be at all surprised if it didn't. ...
    (rec.arts.comics.strips)
  • Re: FBOFW, 1-10
    ... > secretly wants to talk to Mike so the two can get to know each other ... Lotsa people watch TV ... watching that was a party in itself. ... hitting the mute then talking. ...
    (rec.arts.comics.strips)
  • Re: Russian "Proletarian" Watches
    ... Nate Nagel wrote: ... > Mike wrote: ... >>>Does anyone here have any experience working on ... >> Lots of folks on the Poor Mans Watch Forum have them. ...
    (alt.horology)
  • Re: in need of rejuvenation . . .
    ... Maybe check out Mike Gellar's site for some live or recorded master ... You can read the class writeups, watch a few samples, and see if ...
    (rec.music.makers.guitar.jazz)
  • Re: Networking with PCs
    ... Gotcha. ... So, I offer sincere help, then find out you were just trolling? ... Mike, we seem to have come off on the wrong foot. ... help someone in csma with windows problems) to help me. ...
    (comp.sys.mac.advocacy)