Re: internal procedure can't use array of derived type from main
From: Richard Maine (nospam_at_see.signature)
Date: 03/15/04
- Next message: John S: "disk file reads slow down for file sizes greater than 2 GB"
- Previous message: Richard Maine: "Re: first time using direct access files: recl ??"
- In reply to: Dr. Richard E. Hawkins: "Re: internal procedure can't use array of derived type from main"
- Next in thread: Dr. Richard E. Hawkins: "Re: internal procedure can't use array of derived type from main"
- Reply: Dr. Richard E. Hawkins: "Re: internal procedure can't use array of derived type from main"
- Reply: Jan C. Vorbrüggen: "Re: internal procedure can't use array of derived type from main"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: John S: "disk file reads slow down for file sizes greater than 2 GB"
- Previous message: Richard Maine: "Re: first time using direct access files: recl ??"
- In reply to: Dr. Richard E. Hawkins: "Re: internal procedure can't use array of derived type from main"
- Next in thread: Dr. Richard E. Hawkins: "Re: internal procedure can't use array of derived type from main"
- Reply: Dr. Richard E. Hawkins: "Re: internal procedure can't use array of derived type from main"
- Reply: Jan C. Vorbrüggen: "Re: internal procedure can't use array of derived type from main"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|