Creating a function in Plua2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating a function in Plua2

josermr
Can anybody tell me how to create a function from scratch using Plua2.
I've been trying to create such a function but even though I'm doing
everything as per Lua,Plua manuals I can't get the code to run on My
Tungsten T3 all I get is an error message.






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply | Threaded
Open this post in threaded view
|

Re: Creating a function in Plua2

bh77a-2
While this is a very basic example, here are the basics of writing
functions...

-- SAMPLE CODE
------------------------
function printme()  -- name your function
------------------------
   w,h,d,hC=ui.mode()  -- some code to run
   print("Your display resolution for Plua is:")
   print(w,h)
end  -- close your function

printme()  -- call your function
ui.event()  -- get a pen tap, etc to close
-- END SAMPLE CODE



On Mar 17, 2006, at 2:28 PM, josermr wrote:

> Can anybody tell me how to create a function from scratch using Plua2.
> I've been trying to create such a function but even though I'm doing
> everything as per Lua,Plua manuals I can't get the code to run on My
> Tungsten T3 all I get is an error message.
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/