Question about Object Names
Devin Asay
devin_asay at byu.edu
Fri May 27 11:41:15 EDT 2011
On May 27, 2011, at 9:30 AM, Richard Gaskin wrote:
> Todd Geist wrote:
>
>> On Fri, May 27, 2011 at 7:57 AM, Richard Gaskin wrote:
>>> For example, you can call the numToChar function using either of these two
>>> forms:
>>>
>>> numToChar(128)
>>> the numToChar of 128
>>>
>>> Meanwhile, the sum function can only be called using function syntax:
>>>
>>> sum(1,2,3) -- works
>>> the sum of "1,2,3" -- throws an error
>>
>> Is there a pattern at all in when one is form is not allowed?
>>
>> In the example you gave, the sum function takes a list of numbers, where the
>> numToChar takes a single item.
>
> There may be a pattern; I'm sure it made sense to whomever came up with
> that "sometimes" rule at the time.
My understanding is that the 2nd, "prose" or "property", form can only be used with functions that require 0 or 1 arguments. All others require the "funtion(n)" form. And the "prose" form is only allowed for native LiveCode functions, not for user-defined functions.
Have you seen any counter examples to this rule?
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list