Hej everyone,
I have a syntax convention question. Take the Julia
syntax convention as an example.
Consider an arbitrary function. The convention in Julia is y = foo(x)
does not do pre-allocate y
, while foo!(y, x)
pre-allocates the y
array and modifies it in-place.
What I’m currently using in Fortran
is:
y = foo(x) ! No preallocation version.
and
call foo_ip(y, x) ! Array y is pre-allocated.
The _ip
stands for in-place. I was wondering though if there is such a syntax convention in Fortran
. I kind of recall this was discussed at some point but I’ve been unable to find the corresponding thread.