Math problem

Joe Lewis Wilkins pepetoo at cox.net
Sat Feb 18 22:51:45 EST 2012


That's great. I understand. Sometimes we get a bit too cryptic for our own good. (smile)

Joe Wilkins
Architect

On Feb 18, 2012, at 7:45 PM, Geoff Canyon Rev wrote:

> This is the entire function definition, with the comment in place:
> 
> function roundUp x,i -- rounds x up to the next i
>  return x div i * i + item itemoffset((x mod i > 0),"true,false") of (i,0)
> end roundUp
> 
> I only included the first line in my original question because it's the
> only line with a comment.
> 
> gc
> 
> On Sat, Feb 18, 2012 at 9:39 PM, Joe Lewis Wilkins <pepetoo at cox.net> wrote:
> 
>> Kind of true Geoff, but the call would have arguments in place of
>> parameters, whereas
>> function roundUp x,i  isn't the function's definition either. Not
>> intending to nit-pick.
>> 
>> Joe Wilkins
>> Architect
>> 
>> On Feb 18, 2012, at 7:01 PM, Geoff Canyon Rev wrote:
>> 
>>> ? That is the definition (and not a call).
>>> 
>>> On Sat, Feb 18, 2012 at 2:24 PM, Joe Lewis Wilkins <pepetoo at cox.net>
>> wrote:
>>> 
>>>> Certainly better than nothing; but, if you put it in the function
>>>> definition instead of the calls, you only have to do it one time.
>>>> 
>>>> Joe Wilkins
>>>> 
>>>> On Feb 18, 2012, at 12:04 PM, gcanyon+rev wrote:
>>>> 
>>>>> I'm curious what you think of this, which is what I try to do regularly
>>>> when I create one-liners (which I favor).
>>>>> 
>>>>> function roundUp x,i -- rounds x up to the next i
>>>>> 
>>>>> On Feb 18, 2012, at 11:23 AM, Joe Lewis Wilkins <pepetoo at cox.net>
>> wrote:
>>>>> 
>>>>>> If you're going to use one liners like this, you'd better add some
>>>> commentary.
>>>>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list