?
Solved

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

Posted on 2000-05-04
3
Medium Priority
?
1,081 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 600 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

762 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