Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > a compile probl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 8433 of 8908
Post > Topic >>

a compile problem about loop func

by j.s.supermail@[EMAIL PROTECTED] Jun 30, 2008 at 02:55 PM

Hi, everyone

I'm new to fortran. From an online tutorial I've found the following
code example:

        Integer I, n, sum

        sum = 0
        do 10 i = 1, n
                  sum = sum + i
                  write(*,*) 'sum=', sum
10       continue
stop
end

When I compile this function with g77 loop.f, the error comes out:
sum = 0 ( there's a small arrow under 's')
End of source file before end of block started at (^)

Does someone know how to deal with it?

Thanks a lot
 




 6 Posts in Topic:
a compile problem about loop func
j.s.supermail@[EMAIL PROT  2008-06-30 14:55:55 
Re: a compile problem about loop func
dpb <none@[EMAIL PROTE  2008-06-30 17:07:04 
Re: a compile problem about loop func
"Dr Ivan D. Reid&quo  2008-06-30 22:09:27 
Re: a compile problem about loop func
Gary Scott <garylscott  2008-06-30 17:13:04 
Re: a compile problem about loop func
e p chandler <epc8@[EM  2008-06-30 15:16:31 
Re: a compile problem about loop func
j.s.supermail@[EMAIL PROT  2008-07-04 13:11:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 7:58:29 CST 2008.