Gabriel Wu
Gabriel Wu
Currently, the following Fortran source ```fortran module test implicit none contains subroutine a(in, out) integer, intent(in) :: in integer, intent(out) :: out integer :: i if (.true.) print *, "in...
Seems that `Use_t` only exists in AST but not ASR. Then how should I handle `use` statements correctly?
> The first error is probably due to a missing mod file for the module you are trying to use. We have to improve the error I have put the...
Today's progress: Input: ```fortran module test implicit none contains subroutine a(in, out, out2) integer, intent(in) :: in integer, intent(out) :: out(20), out2 integer :: i, arr(10, 20) if (.true.) print...
@certik An obstacle here is that I need to know whether a local variable is used in function/subroutine calls as an output argument, in which case it should be wrapped...
Proper Julia code should be ```julia function a() local i::Base.RefValue{Int32} = Ref(Int32(0)) b(i) println(i[]) end function b(out::Base.RefValue{Int32}) out[] = 3 end function main() a() end main() ``` > Note: In...
> So if `out` is of type `Base.RefValue{Int32}` in a function signature then `i` (the parameter) should also be of type `Base.RefValue{Int32}`? Can we not do, `out::Base.RefValue{Int32}` with `i` of...
@czgdp1807 Sadly, we cannot.
`i` will remain `0`. Using `i2 = Ref(i)` does not mean `i` is changed when `i2[]` is changed. It just passes the current value of `i` as the initial internal...
@czgdp1807 Yours is a possible solution, yet some minor modifications need to be done. The following code works properly. ```julia function a() local i::Int32 = 0 local i_ref::Base.RefValue{Int32} = Ref(i)...