Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
General Questions about #Include statements
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00858377
Message ID:
00858385
Views:
11
>Hi,
>
>I have three include files that I want to include with my project. My predecessor would declare them in a method where the include file would be accessed but I would like to declare it only once in the startup program.
>
>So I have a few questions:
>
>1. Can I call all the include statements in the startup program and will they then be available throughout the operations of the program?

Easy answer is no. The include file is included at compiled time and are basicly replace the text in the code. So you can't treat them like variables.

>2. Can I have more than one include file declared at a time or should I combine all of my include files into one file?

You can in the code do
#INCLUDE include1.h
#INCLUDE include2.h
>3. Is there a command similar to the Set("Path") that will allow me to see what has been declared.

Not that I know of

>Any suggestions for a better way to handle this issue would be greatly appreciated. BTW, I am using VFP 8 sp1.

If you are trying to include files with classes or forms and have more than one include file you can make one include file that has all the other include file in them.

an example of what a includeall.h
#INCLUDE include1.h
#INCLUDE include2.h
#INCLUDE include3.h
#INCLUDE include4.h
#INCLUDE include5.h
Then you would only have one include file that would link to the other include files. Then in a form or class, if the class is visual, go to the class or form menu option and pick include file and select the includeall.h

>Sincerely,
>
>mickbw


Hope this helps.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform