What is the syntax in modern Fortran to declare an array without giving its length and letting the compiler determine the length from the declaration?
The following examples don't work:
program ONE
real :: V = [1,2,3]
end program
program ONE
real :: V(*) = [1,2,3]
end program
but this example does work:
program ONE
real :: V(3) = [1,2,3]
end program
Why can't the compiler calculate the required length from the declaration? Is there a way to do this?