An interesting programming challenge

Colin Holgate colinholgate at gmail.com
Thu Apr 9 21:47:58 EDT 2015


Why does this work? what if further numbers are negative, and tRunningSum becomes less than 32, would you want to subtract from tSlices?


> On Apr 9, 2015, at 9:43 PM, Jerry Jensen <jhj at jhj.com> wrote:
> 
> 
>      put 0 into tRunningSum
>      repeat for each item tItem in tRay
>         add tItem to tRunningSum
>         if tRunningSum >= 32 then add 1 to tSlices
>      end repeat




More information about the use-livecode mailing list