Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameter to a VFP EXE file
Message
De
15/07/1998 08:00:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/07/1998 07:43:25
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00117515
Message ID:
00117534
Vues:
27
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform