Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preprocessor Directors and Macro Substitution
Message
De
29/06/1999 10:07:06
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
28/06/1999 20:00:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00235018
Message ID:
00235218
Vues:
19
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform