944,175 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 3587
  • VB.NET RSS
May 16th, 2007
0

Accumulators and counters

Expand Post »
When I look at a statement, how can i tell whether it's an accumulator or a counter?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
NAGASAKI is offline Offline
2 posts
since May 2007
May 17th, 2007
0

Re: Accumulators and counters

Please give an example. An accumulator will generally add several numbers to it. A counter adds one.
Reputation Points: 84
Solved Threads: 58
Posting Pro in Training
waynespangler is offline Offline
461 posts
since Dec 2002
May 17th, 2007
0

Re: Accumulators and counters

Thank you! You've answered my question. I thought a counter could add more than one.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
NAGASAKI is offline Offline
2 posts
since May 2007
May 17th, 2007
0

Re: Accumulators and counters

The qualifier is "generally". No hard and fast rule.
Reputation Points: 84
Solved Threads: 58
Posting Pro in Training
waynespangler is offline Offline
461 posts
since Dec 2002
Feb 25th, 2010
0

Accumulators and counters

'Loop allows for a repitition of statements - using a condition to decide when the loop should continue or stop
'There are 2 main concepts that come into loops;
'1 - Incrementing - counter = counter + 1 -- always by a constant (in this case '1')
'2 - Accumulating - totalsales = totalsales + sales -- always by a variable (in this case 'sales')
Reputation Points: 10
Solved Threads: 0
Newbie Poster
J-eezy is offline Offline
1 posts
since Feb 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: webBrowser Specified cast is not valid.
Next Thread in VB.NET Forum Timeline: Play 2nd SWF





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC