Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Default value for allocatable derived type component #3

Open
jacobwilliams opened this issue Jul 5, 2017 · 0 comments
Open

Comments

@jacobwilliams
Copy link
Member

jacobwilliams commented Jul 5, 2017

Allow for the default state of allocatable variables to be allocated with a specified value:

type my_type
  integer :: i = 1  ! this has "always" been possible
  character(len=:),allocatable :: str = 'default'  ! this is not currently possible
end type my_type

This would also enable parameters:

  type(my_type),parameter :: t1 = my_type(1,'option 1')
  type(my_type),parameter :: t2 = my_type(2,'option 2')
@jacobwilliams jacobwilliams changed the title Default value for allocatable derived type component Proposal: Default value for allocatable derived type component Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant