main() arguments

Discuss topics that apply across the products, such as the PocketC language, or development in general

Postby on Fri Jun 15, 2007 9:54 am

I am writing a program in PocketC that does some number crunching on a database stored in the Palm. The program is called from an another app that passes an integer and a string as arguments in the main(). For example, main(int argc, string argv)
Is argument passing in main() allowed in PocketC ?
It seems as though when I trigger this call from the app, the program does nothing; the app gets control back -- no errors, but the PocketC program doesn't even put out an alert msg I programmed in to show it was called.
Posts: 1
Joined: Fri Jun 15, 2007 9:38 am

Postby dewey on Tue Jun 19, 2007 4:54 am

PocketC does not support passing arguments in main().
If you are using OrbForms or PocketC Architect, you can pass strings between different OrbC apps by calling launchCustomString(). The callee retrieves the args via UIApp.launchArgs. See the launchCustomString docs for details.
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest