Skip to content

elemental function result must not be allocatable #6

@brietzke

Description

@brietzke

Dear Stefano,

I just came across the flap code and found it can not compile since not standard conforming:
the function set_extension is declared with the elemental prefix.
But the function result is defined as allocatable which appears to be forbidden according to the fortran-standard (e.g. recent draft of f2008,f2015). A function with an allocatable function result must not be declared elemental.

Also I found that in the case of a matching file-extension the set_extension function result is not getting allocated. Not sure about the intention here: but maybe in case of matching extension newfilename should be assigned the original filename, e.g. like:
if(...)
:
else
newfilename = filename
endif

I apreciate your work anyway.
cheers
Gilbert

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions