Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preprocessor Directors and Macro Substitution
Message
From
29/06/1999 10:07:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/06/1999 20:00:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00235018
Message ID:
00235218
Views:
18
>The preprocessor run only once, before compiling the source code. Since the preprocessor can't see inside the macro, it cannot replace constants like wdWindowStateMaximize. Which mean that you will receive an error message at run time, since wdWindowStateMaximize doesn't say anything to the called method. It expect a numeric value.
>
>Your second method work, because the preprocessor see the constant and can change it by it's numeric equivalent before the compilation is done.
>
>Since you want to be able to run code inside a memo field, the only solution I see is to ignore the constant (wdWindowStateMaximize) and to use their numeric equivalent instead.

He may also declare the constants used as local numeric variables, by inserting the necessary parts of the .h file and instead of

#define wzWhatever 0

putting

wzWhatever=0

Then the macros should work-

back to same old

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

Click here to load this message in the networking platform