Reference Function Name Via Variable?

Kay C Lan lan.kc.macmail at gmail.com
Thu Jan 15 20:21:02 EST 2009


On Fri, Jan 16, 2009 at 3:45 AM, Scott Rossi <scott at tactilemedia.com> wrote:

> Hi List:
>
> Just curious...  Is there any way to construct a function using a name
> stored in a variable without resorting to "do"?  For example:
>
> Sorry, I couldn't get replace your 'do' line with a single line but I'm
sure someone here can:

ON mouseUp
    put "hello" into pData1
    put "world" into pData2
    put "shout" into test
    put test & "(pData1,pData2)" into tNewFunction
    answer merge("[[value(tNewFunction)]]")
END mouseUp

FUNCTION shout pData1,pData2
    return pData1 && pData2
END shout

HTH



More information about the use-livecode mailing list