Re: Allocatable vs pointer in procedure resolution

From: Rich Townsend (rhdt_at_barVOIDtol.udel.edu)
Date: 07/30/04

  • Next message: Greg Lindahl: "Re: C objects [was Re: Is Itanium the first 64-bit casualty?]"
    Date: Fri, 30 Jul 2004 09:09:34 -0400
    
    

    r08n wrote:
    > Rich Townsend <rhdt@barVOIDtol.udel.edu> wrote in message news:<ceavs9$r5h$1@scrotar.nss.udel.edu>...
    >
    >
    >>The problem, in essence, is whether it is possible to distinguish
    >>between the signatures of, for instance,
    >>
    >>real, dimension(:), pointer :: foo
    >>
    >>and
    >>
    >>real, dimension(:), allocatable :: foo
    >>
    >
    >
    > Why do you need different procedures? You can do [almost] the same things
    > with both allocatable arrays and pointers.

    I'm writing library routines, and I want the user to be able to
    reallocate both POINTER and ALLOCATABLE arrays. Therefore, I have to
    provide routines to handle both. I'd like to access these routines under
    the same name, but from the replies I've had to my post (thanks to all
    who responded!) it looks like this won't be possible.

    cheers,

    Rich

    -- 
    Dr Richard H D Townsend
    Bartol Research Institute
    University of Delaware
    [ Delete VOID for valid email address ]
    

  • Next message: Greg Lindahl: "Re: C objects [was Re: Is Itanium the first 64-bit casualty?]"

    Relevant Pages

    • Re: Advice for Skybuck project.
      ... Do not use exceptions to indicate failures of get proc address for dynamic linking of routines. ... Do not rely on the compiler to initialize the pointers to nil. ...
      (alt.comp.lang.borland-delphi)
    • Advice for jedi project.
      ... dynamic linking of routines. ... Do not rely on the compiler to initialize the pointers to nil. ... Pointers will remain nil if get proc address failed. ...
      (alt.comp.lang.borland-delphi)
    • Re: Storing function handles
      ... Until the vendor of your choice someday implements F2003 procedure pointers, ... If your vendor supports a POSIX 1003.9 library, ... The procedures callable by these routines are ... Walt Spector ...
      (comp.lang.fortran)
    • Re: a history question
      ... and ALLOCATABLE arrays will be preferred for these uses. ... >>F2003 POINTERs will still be useful in referring to array sections, ... > finally is being allowed in F2003 for ALLOCATABLEs. ... 'self-referential' derived types, ...
      (comp.lang.fortran)
    • Re: bug with ifort + openmp : allocatable array not allocated after allocation
      ... Meanwhile I have re-written the code using pointers, ... Allocatable arrays are always better for optimization. ... User communities for Intel Software Development Products ... Intel Fortran Support ...
      (comp.lang.fortran)