Gary,
Scrap that,
I meant:
 <<Program>> Param1||Param2||Param3

Just be careful you don't have spaces in the parameters and parse the string
using Getwordcount()and Getwordnum() with the terminating parameter "||"

I wasn't thinking in the first example!

Dave Crozier



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Garry Bettle
Sent: 21 August 2007 21:11
To: [email protected]
Subject: Missing Parameters in Main.prg

Howdy all,

Hope this email finds everyone well.

I have the following code in the Main.prg of my project:

LPARAMETERS tcMarketId, tcParam1, tcParam2, tcParam3

LOCAL gcStartDir

ON SHUTDOWN DO myShutDown

= MESSAGEBOX( [tcMarketId = ] + TRANSFORM( tcMarketId) + [, ] + ;
                          [tcParam1 = ] + TRANSFORM( tcParam1) + [, ] + ;
                          [tcParam2 = ] + TRANSFORM( tcParam2) + [, ] + ;
                          [tcParam3 = ] + TRANSFORM( tcParam3), 0, SYS(16))

IF PCOUNT() > 0 AND LEN( ALLTRIM( TRANSFORM( tcMarketId))) = 8
        gcStartDir = CURDIR()
        SET DEFAULT TO ["] + gcStartDir + ["]
        DO CASE
                CASE PCOUNT() = 1
                        DO FORM [frmMyForm.scx] WITH tcId
                CASE PCOUNT() = 2
                        DO FORM [frmMyForm.scx] WITH tcId, tcParam1
                CASE PCOUNT() = 3
                        DO FORM [frmMyForm.scx] WITH tcId, tcParam1,
tcParam2
                CASE PCOUNT() = 4
                        DO FORM [frmMyForm..scx] WITH tcId, tcParam1,
tcParam2, tcParam3
        ENDCASE
ENDIF


PS:  The Messagebox() is for testing.

If I make a call like this:

MyProgram.exe 12345678 /Option1

then two parameters are passed:

12345678, /Option1

But, if I make a call like this:

MyProgram.exe 12345678 /Option1 /Option2

I get this:

12345678, /Option1, .F.

I can never get more than 2 parameters.

Grrr... Can anyone help?

Many thanks in advance.

Cheers,

Garry


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to