Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you call a PRG which returns a value?
Message
 
À
03/11/2011 17:21:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01527979
Message ID:
01527997
Vues:
57
>I need to dynamically resolve the name.
>
>I look for the new SCCTextX.prg from VFPx first, and if it's present I use it, and if not, I default to original SCCText.prg
>
>
>
>lcSCCText = Home(1) + 'SCCTextX.prg' && Look for the enhanced one from VFPx.
>
>If !File(lcSCCText)
>	lcSCCText = Home(1) + 'SCCText.prg' && Use the original one that shipped with VFP
>EndIf
>
>lcFile = 'C:\MyCode\MyForm.scx'
>
>lnReturn = &lcSCCText(lcFile)
>
>
>
>
>So, it gives an error on the line:
>
>lnReturn = &lcSCCText(lcFile)
>
Hi Matt,
If performance is not an issue you can try:
lnReturn = execscript(filetostr(lcSCCText), lcFile)
Hugo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform