Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow To Save In Form Designer
Message
From
14/10/2002 10:27:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00710859
Message ID:
00710907
Views:
9
>Hi Gary.
>
>
>>Wow - I solved the problem but I'm amazed at the solution <s>. Yesterday, I added some Word automation code and included the Word2000.h file in another include file that is utilised throughout the whole application. I dropped the automation code in favour of another solution. After finding that more or less everything was slowing down, I racked my brains for what I had done differently. I pulled the Word2000.h file out and "bingo", everything back to normal. I didn't realise what sort of impact this could have.
>>
>>Anyhow, problem solved.
>
>
>Will this have an inpact during execution time as well ?
>
>Best.

The reason it won't affect performance during execution is that each occurence of the constant is replaced by the constant at compile time.

For instance:
#DEFINE PI 3
will replace each occurrence of PI with 3 in your code (1) - the compiled code will work exactly as if you had typed 3.

The constants are used for easy maintenance of your program.


Notes:

(1) OK, I know that this is not extremely accurate... but this value was actually used in the past, sometimes even declared by law.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform