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 > Summing array e...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 27 Topic 8156 of 8528
Post > Topic >>

Summing array elements

by Luka Djigas <ldigas@[EMAIL PROTECTED] > Apr 20, 2008 at 02:58 AM

What would be the shortest way to sum some elements of an array? For
example from 5 to 50.

I know the "obvious" way to do it:
s=0.
do 1 i=5,50
s=s+a(i)
1 continue

but since I'm currently doing something which requires quite a number
of summing, I was wondering is there something shorter ?

Any idead appreciated

regards
Luka
 




 27 Posts in Topic:
Summing array elements
Luka Djigas <ldigas@[E  2008-04-20 02:58:34 
Re: Summing array elements
"Craig Dedo" &l  2008-04-19 20:40:11 
Re: Summing array elements
"Gerry Ford" &l  2008-04-19 23:12:13 
Re: Summing array elements
dongyuanxun <dongyuanx  2008-04-19 21:19:08 
Re: Summing array elements
nospam@[EMAIL PROTECTED]   2008-04-19 21:29:07 
Re: Summing array elements
"Gerry Ford" &l  2008-04-20 01:29:19 
Re: Summing array elements
dongyuanxun <dongyuanx  2008-04-19 21:37:45 
Re: Summing array elements
Luka Djigas <ldigas@[E  2008-04-20 16:07:55 
Re: Summing array elements
Ron Shepard <ron-shepa  2008-04-20 09:44:15 
Re: Summing array elements
"Gerry Ford" &l  2008-04-21 01:25:07 
Re: Summing array elements
nospam@[EMAIL PROTECTED]   2008-04-21 07:58:38 
Re: Summing array elements
Ron Shepard <ron-shepa  2008-04-21 11:25:29 
Re: Summing array elements
"Gerry Ford" &l  2008-04-22 23:39:35 
Re: Summing array elements
"Gerry Ford" &l  2008-04-22 23:31:10 
Re: Summing array elements
"jamesgiles@[EMAIL P  2008-04-20 14:10:59 
Re: Summing array elements
dongyuanxun <dongyuanx  2008-04-19 21:10:10 
Re: Summing array elements
Luka Djigas <ldigas@[E  2008-04-20 16:30:12 
Re: Summing array elements
dpb <none@[EMAIL PROTE  2008-04-20 09:48:56 
Re: Summing array elements
"David Frank" &  2008-04-20 11:05:57 
Re: Summing array elements
dpb <none@[EMAIL PROTE  2008-04-20 10:21:27 
Re: Summing array elements
Luka Djigas <ldigas@[E  2008-04-21 01:35:50 
Re: Summing array elements
dpb <none@[EMAIL PROTE  2008-04-20 18:59:37 
Re: Summing array elements
glen herrmannsfeldt <g  2008-04-20 16:21:20 
Re: Summing array elements
Luka Djigas <ldigas@[E  2008-04-21 04:03:01 
Re: Summing array elements
Luka Djigas <ldigas@[E  2008-04-21 04:01:17 
Re: Summing array elements
"Gerry Ford" &l  2008-04-21 01:40:21 
Re: Summing array elements
Luka Djigas <ldigas@[E  2008-04-21 01:12:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Jul 18 20:35:18 CDT 2008.