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

[BUG] Add support for returning array of characters #55

Open
rjfarmer opened this issue Feb 27, 2024 · 1 comment
Open

[BUG] Add support for returning array of characters #55

rjfarmer opened this issue Feb 27, 2024 · 1 comment
Labels

Comments

@rjfarmer
Copy link
Owner

import gfort2py as gf


fstr =  """

recursive function return_char(x) result(str)
  implicit none
  integer, intent(in) :: x
  character(len=20), dimension((2 ** x - 1) ) :: str

  str = ''

end function return_char

"""


x = gf.compile(fstr)


res = x.return_char(2)

print(res.result)

Returns:

TypeError: Unknown type of character array not currently supported
@rjfarmer rjfarmer added the bug label Feb 27, 2024
@rjfarmer
Copy link
Owner Author

rjfarmer commented Feb 27, 2024

Note the char return array is_always_explicit. We need to build an array descriptor for strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant