Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Allocatable arrays

space-tech1
Beginner
486 Views
Hi

I compile the following code in fortran 2011 on windows, there is no error in compilation
but I don't get array c( the result page is blank). I am using the allocatable array feature of Fortarn 2003.My source code is in ".f90" .

program bob
implicit none
real,dimension(2,2)::a=reshape((/2.,3.5,5.,65.236/),(/2,2/))
real , dimension(2,2) :: b=reshape((/5.,2.32,9.,5.5/),(/2,2/))
real , dimension(:,:),allocatable :: c
c = a+b
write(*,*) c
end program bob

0 Kudos
1 Reply
Steven_L_Intel1
Employee
486 Views
By default, the compiler does not support the automatic reallocation on assignment of allocatable arrays. Add the /standard-semantics option to get all Fortran 2003 semantics including this one. If in Visual Studio, this is a property on the Language page.
0 Kudos
Reply