Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameter to a VFP EXE file
Message
From
15/07/1998 08:41:03
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brazil
 
 
To
15/07/1998 08:00:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00117515
Message ID:
00117547
Views:
31
Thank you very much, Cetin and Jerry, for all the information. Now it is working perfectly...


>>>>Is it possible?? If so, how should look the target line in a shortcut?
>>>>
>>>Yes,
>>>Target line would be like any other parameter line. But from VFP side you get only one string parameter (containing whole parameter line) and parse it as appropriate.
>>
>>Hi Cetin, could you give me an example? I´ve been playing with this and I always get a vfp error... Don´t know what I am doing wrong. I think everything is right by the vfp side: I need only one parameter which is received in the main prg.
>Hi Renato,
>First a correction to my previous reply. Now with VFP parameters are parsed as spaces encountered on parameter line automatically and you have true parameters() count. Below is an example :
>* VFP main - vfpparamtest.exe
>parameters m1,m2,m3
>? parameters()
>? type("m1"),m1
>? type("m2"),m2
>? type("m3"),m3
>
>* Calling line (shortcut): vfpparamtest.exe 5 .t. test
>* Equivalant inside VFP calling vfpparamtest("5",".t.","test")
>
>* Output
>3
>C 5
>C .t.
>C test
>
>Now something you should be aware of is all passed parameters are CHAR type. If your program waits something different ie: numeric you must convert it :
*Main.prg
>parameters gnLoopCount
>* gnLoopCount is got as char
>gnLoopCount = val(gnLoopCount)  && Convert it to num
Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform