Solved

How do I SUM the values in a LotusScript integer array?

Posted on 2000-05-04
3
1,051 Views
Last Modified: 2013-12-18
I have a non-dynamic LotusScript array of integer values and I want to SUM.  I understand that I need to loop through the array (ForAll?) and sum the values in each array element, but I'm not quite sure how to do it.  Need help FAST!  =)

Thanks, Chad
0
Comment
Question by:chad_wessel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Expert Comment

by:ghassan99
ID: 2777171
Dim values(5) As Integer
Dim x,y As Integer

values(0) = 25
values(1) = 20
values(2) = 15
values(3) = 10
values(4) = 5

y = 0

For x=0 to 4
   y = y + values(x)
End For

y has the total value of all the elements of the array.

-Gus
0
 
LVL 6

Accepted Solution

by:
ghassan99 earned 200 total points
ID: 2777178
If you want to use ForAll:

ForAll x in values
   y = y + x
End ForAll

-Gus
0
 

Author Comment

by:chad_wessel
ID: 2778031
thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question