Using repeat loop to add values

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using repeat loop to add values

Post by bogs » Thu Oct 26, 2017 9:37 pm

[-hh] wrote:
Thu Oct 26, 2017 8:51 pm
I really wonder why you are ignoring the wonderful super fast function sum()?
We don't know Josh1910 (the OP) is ignoring it, -hh, I sure hope he isn't, I know I won't 8) I just like having everyone chip into solutions, I find it educational.
Mmmmmmmm Kitty kabobs. Yum.
Kitty ka-boobels, table of one ! Now, if you have 6 kit-kablobs per plate, and your neighboring table is stealing an occasional one behind your back, how many plates of ker-plops do you have to eat before you smack the thief on the neighboring table :?:

Per -hh's wonderful suggestion, we now KNOW !

Code: Select all

put sum(ka-boobels,kit-kablobs,ker-plops / thiefSmack) into tempsum
MARVELOUS!! :twisted:
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Using repeat loop to add values

Post by [-hh] » Thu Oct 26, 2017 10:01 pm

No, no. Don't divide by zero!
It is not all clear that ker-plops / thiefSmack is a number!
LC-infinity is not yet here, not positive nor negative.
shiftLock happens

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Using repeat loop to add values

Post by Mikey » Thu Oct 26, 2017 10:09 pm

I won't be worried unless we start getting -0.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Using repeat loop to add values

Post by [-hh] » Thu Oct 26, 2017 10:23 pm

You are right.
-0 is a date ;-)
shiftLock happens

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using repeat loop to add values

Post by bogs » Thu Oct 26, 2017 10:56 pm

:twisted: :twisted:
Image

Josh1910
Posts: 19
Joined: Tue Jan 20, 2015 7:30 am

Re: Using repeat loop to add values

Post by Josh1910 » Sun Oct 29, 2017 3:18 pm

Thank you all for the wonderful replies. Really do love this community!

Post Reply