Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you call a PRG which returns a value?
Message
 
 
To
03/11/2011 17:21:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01527979
Message ID:
01527987
Views:
130
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform