Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unlimited number of parameters
Message
De
27/01/2005 16:13:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00981000
Message ID:
00981487
Vues:
53
>I think I miss something here, for I do not see why would that be a problem.
>
>
MyExe "SomeParameter,Another,/GUI,/Log,OneLastParameter"
>
>Then parsing that list you'll have the /GUI and /Log parameters as well. But, I am sure I am missing something, I have a terrible headache right now :(

The problem is that the first parameter is the name of a PRG. But, the second parameter, if present, could be an unlimited number of parameters that the PRG would need.

So, for example, this is one I have right now:
"D:\Visual FoxPro Projects\DMIB FoxRun\main.exe" "D:\visual foxpro projects\dmib foxrun\PRG\fact_xls.prg,2004\01\01,2004\12\31,M ET M,metm.xls" "/LOG"
In this case, we are calling D:\visual foxpro projects\dmib foxrun\PRG\fact_xls.prg for the PRG which expects to receive 2004\01\01, 2004\12\31, M ET M, and metm.xls as parameters. So, what I did was to put all that in quotes. The first one is the PRG and it always there. If I have a second parameter and so on in that quote, that means the PRG will expect those parameters. So far so good but I need a bunch of other optional parameters such as /LOG which accepts a log file as a parameter and /GUI, etc. So, the proposed approach I have thought would make sense is to keep the current first quoted parameter as is which handles the PRG and its parameters. Then, I would pass another quoted parameter for all the switches.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform