Skip to content

Overloading () #119

Open
Open
@jacobwilliams

Description

@jacobwilliams

I haven't fully thought this through yet, but what if we had the ability to overload () for a derived type in various contexts? That could be used for some interesting things.

Such as dictionaries:

type(dict) :: d
d('key') = 1
d(1995) = 'string'

or a string class:

type(string) :: s
s = 'hello world'
write(*,*) s(1:5)   ! this writes 'hello'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Clause 9Standard Clause 9: Use of data objects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions