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

Printing derived types works with print but not write #3413

Open
certik opened this issue Feb 14, 2024 · 0 comments
Open

Printing derived types works with print but not write #3413

certik opened this issue Feb 14, 2024 · 0 comments

Comments

@certik
Copy link
Contributor

certik commented Feb 14, 2024

Test case:

program print_derived_type
implicit none
type input01
    real(kind=8) :: beta_in,beta_out,stagger
end type input01
type(input01) :: angle_inp
print *, angle_inp ! works
write (*,*), angle_inp ! does not work
end program

This gives:

$ lfortran a.f90
code generation error: Printing support is not available for `input01` type.
 --> a.f90:8:1
  |
8 | write (*,*), angle_inp ! does not work
  | ^^^^^^^^^^^^^^^^^^^^^^ 
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