Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Problem with set to dynamic variable

waleryp
Beginner
454 Views
I have problem with set to dynamic variable.

During set Param_Tau(I) to Temp1 deskription value {...} (page1) change to " Undefined pointer/array" (page2). I don't understand why array during sets is deallocate.
The sample code I show below. I'm use "Intel Fortran Compiler Integration for Microsoft Visual Studio .NET 2003, Version 9.0.2713.2003".

Thanks in advance.
Valeriy.

P.S. I'm sorry but my english is not perfect.



Real*8, dimension(:), pointer :: Param_Tau, Param_Temp
Real*8 :: Temp1, Temp2

COMMON /Parametr7/ Param_Tau, Param_Temp

Read(1,*) Param_Ntemp

Allocate(Param_Tau(Param_Ntemp))
Allocate(Param_Temp(Param_Ntemp))

Do I=1,Param_Ntemp
Read(1,*, err=10) Temp1, Temp2
Param_Tau(I)=Temp1
Param_Temp(I)=Temp2
EndDo
0 Kudos
0 Replies
Reply