New Reply

SUM (intrinsic) function FORTRAN

 
Share Thread
Jul18-12, 12:44 PM   #1
 

SUM (intrinsic) function FORTRAN


Hi,
I am using two do loops to calculate a value U(i,j). When I sum using the "sum" comman a=sum(U), it is giving me zero as result. I manually added up the elements and the result is not zero.
The "sum" results in a scalar, right? So, I made "a" as REAL variable.
Where am I wrong? Any suggestions.

I don't know to delete the post, consider in deleted. Got the culprit. I made error in allocation of the array.
PhysOrg.com science news on PhysOrg.com

>> City-life changes blackbird personalities, study shows
>> Origins of 'The Hoff' crab revealed (w/ Video)
>> Older males make better fathers: Mature male beetles work harder, care less about female infidelity
New Reply

Similar discussions for: SUM (intrinsic) function FORTRAN
Thread Forum Replies
Fortran intrinsic functions source code Programming & Comp Sci 6
Fortran help: high precision intrinsic functions (kind = 16)...... Engineering, Comp Sci, & Technology Homework 1
FORTRAN 95: New to fortran, want to learn how to input a function Programming & Comp Sci 1
Fortran - compilator dependent, intrinsic array manipulation, memory problem Programming & Comp Sci 1
Fortran 90 Intrinsic Function Programming & Comp Sci 0