>>>I want to include header file in a program but condition is this that i can't modify that program. I can write another program but i know that the #define statement only substitute the current prg constant. can anyone help me so that i can use a include file of one prg in the another prg without including in the second one. thanks in advance.
>>>
>>>Deepak.
>>
>>Deepak,
>>
>>Unfortunately, there is no way to include include file rather than put #include myinclude.h at the top of the program. I don't think, if you include file in your main program, it would be visible everythere, I believe, you have to include it each time again. I have to check help on this (and you too), but I'm almost certain, that's true.
>
>Ok, I checked VFP Help and Hacker's Guide, but there is no mention about scope of include file (or I didn't notice it). Anyway, I think, my original statement was true.
Ok, simple test shows me, that this was a false statement. Here is a test:
#include test.h
clea
wait window "My message"+CR nowait
testfun()
return
function testfun
messagebox( "Test " +CR+"more test")
If it's not broken, fix it until it is.
My Blog