Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with #include directive in VFP 8
Message
From
28/10/2003 05:45:59
 
 
To
28/10/2003 05:37:22
Dan Jackson
Healthier Information
London, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00843418
Message ID:
00843422
Views:
27
>Hi all,
>
>I recently upgraded from VFP 7 to 8, & am having a problem with what should be a simple task.
>
>I have a block of code that I want to re-use in all my programs - it sets path, procedure, all my public variables, opens databases, etc. It runs fine as a standalone prog. However, when I include it in other .prg files using #INCLUDE includefile.prg , VFP just doesn't want to run it. I've tried this directive with & without its path, both without success.
>
>Any ideas really appreciated - TIA.

Dan,

I remember trying this in the past. I had no luck either.

According to the help, this is normal behaviour

Only the #DEFINE ... #UNDEF and #IF ... #ENDIF preprocessor directives are recognized in a header file. Comments and Visual FoxPro commands included in a header file are ignored.


You'll have to change
#INCLUDE includefile.prg
into
=includefile()
or
=FunctionNameInIncludefile()
so that the code will execute
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform