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:
01527987
Vues:
138
>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)
>
>
>
You need to use a function name, not the file name. SET PROCEDURE TO (m.lcSCCText)

lnReturn = FuncName(m.lcFile)

where FuncName is the name of the function to get text of the file.

Although in this case I don't see how can you apply this as the SCCText program is not a function.
Also, the parameters are these
parameters cTableName, cType, cTextName, lGenText
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform