Solved

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

Posted on 2000-05-04
3
1,045 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

Suggested Solutions

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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