Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Function questions?

Received: by 10.180.82.226 with SMTP id l2mr2636326wiy.1.1346187794581;
        Tue, 28 Aug 2012 14:03:14 -0700 (PDT)
MIME-Version: 1.0
Path: q11ni347353033wiw.1!nntp.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: nos...@see.signature (Richard Maine)
Newsgroups: comp.lang.fortran
Subject: Re: Function questions?
Date: Tue, 28 Aug 2012 14:03:12 -0700
Lines: 28
Message-ID: <1kpjiqj.1wt44kt19jrks2N%nospam@see.signature>
References: <a0d9e5e5-7e03-465f-9dce-0303e0bbbe79@googlegroups.com> <1kpfr0o.ykzota1bisho8N%nospam@see.signature> <ron-shepard-CE8DCF.19024926082012@news60.forteinc.com> <72447d00-0531-4d64-9f5d-b65dccec07df@j9g2000pbg.googlegroups.com> <aa06vrFvddU1@mid.individual.net> <k1fdqr$dvo$1@dont-email.me> <ron-shepard-FFDBCF.07374327082012@news60.forteinc.com> <1kph9a0.10o0f321nh0ho8N%nospam@see.signature> <k1hu4g$t06$1@dont-email.me> <k1i1fm$lm8$1@speranza.aioe.org> <k1i3ue$rld$1@dont-email.me> <k1jaq3$ljm$1@dont-email.me>
X-Trace: individual.net GHXH0MfDqHLb3wdLy2bepQ4U8gnve7dk13FtExRdLyNRTyzSgjlheV+7Dbx6/r6SMs
X-Orig-Path: nospam
Cancel-Lock: sha1:0ZlxSarzvFCcuUy7/1y0BJwLt+w=
User-Agent: MacSOUP/2.8.3 (Mac OS X version 10.6.8 (x86))

James Van Buskirk <not_va...@comcast.net> wrote:

> "Wolfgang Kilian" <see...@domain.invalid> wrote in message 
> news:k1i3ue$rld$1@dont-email.me...
> 
> > And IIRC, Fortran 2008 introduces recursive derived types with ALLOCATABLE
> > components, so pointers will no longer be required for allocating ordinary
> > lists/trees - hopefully.
> 
> How in the world is that going to work?  You have to insert into,
> delete from, and rebalance trees.  Can you really do all the
> necessary shuffling with allocatables rather than pointers?

I briefly wondered about that myself when Wolfgang posted that. I
decided that you probably could, not that I sat down and verified it in
detail. I'm not sure that I'd actually choose to do it that way myself.
My aversion to pointer function results doesn't extend to rejection of
pointers in all roles. Heck, a lot of list/tree structures end up having
pointers to external data anyway. I think I'd still stick with pointers
for purposes like lists/trees, but on due consideration (several seconds
worth), I think it is probably possible with allocatable components.

The "magic words" are move_alloc. I think that's what makes it possible.

-- 
Richard Maine                    | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle           |  -- Mark Twain