mecej4
Joined: 31 Oct 2006 Posts: 1946 Location: USA
|
Posted: Mon Dec 29, 2025 1:49 am Post subject: SOURCE= clause in ALLOCATE statement |
|
|
Fortran 2003 introduced sourced allocation, as in:
ALLOCATE(v(1:4), SOURCE=2.3)
Fortran 2008 enhanced this with more features.
The source clause is a convenient way of initialising an array or other variable immediately after allocation. FTN95 does not accept this version of ALLOCATE. |
|