Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a PRG outside of an EXE
Message
From
17/10/2001 13:17:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
17/10/2001 10:26:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00569577
Message ID:
00569740
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>This seems to be a simple question but for some reason is not working for me. Must have been too late a night.....
>
>Anyways, I need to call a prg outside of an executable. How would I go about doing this? I keep getting an error that the prg does not exist. I have checked during execution and the file does exist in the location I am pointing to. What am I missing here?

Aside from the need for the .prg to be locatable by your executable, there's another thing: the executable won't automatically compile the .prg, so you'd have to check for the .fxp as well, and compile if needed, roughly like this:
func DoPrg
lparameters cPrg
if not file(cPrg)
   return .f.
else
   cFxp=forceext(cPrg, "fxp")
   lDoCompile=not file(cPrg)
   if not lDoCompile and fdate(cPrg,1)>fdate(cFxp)
      lDoCompile=.t.
   endif
   if lDoCompile
      comp (cPrg)
   endif
   do (cFxp)
   return .t.
endif

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform