Weird behavior calling FORTRAN function

No, they should be Ref (or Ptr, which is equivalent), see Calling fortran function - #8 by simonbyrne.

2 Likes