Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiler Directive... _VFP not allowed?
Message
De
10/07/2003 02:35:07
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
09/07/2003 10:36:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00808212
Message ID:
00808755
Vues:
19
Hi Steve,
this why I mean it's untestet .. I Even didnot know that something like VERSION(5) worked in the #IF statements until this thread.

What I do until now ist to use the the Projecthook to build a little include file. This defines constants with the values I need. I put this include infront of all of my include files (They could be nested). Now I can use the constants.

Agnes
>Agnes,
>
>Unfortunately, that won't work...the precompiler directive does not even see public variables.
>
>I had already tried to do this in beforeBuild() method of projecthook.
>
>>
>>Update:
>>Just an untested idea. Use a project hook to put the information into a public variable.
>>Use this var instead of.
>>
>>Possibly to put the complete reference into a var like
>>
>>*inside the hook:
>>PUBLIC;
>> poActiveObject
>>
>>poActiveObject = _VFP.ActiveProject
>>*compile
>>RELEASE;
>> poActiveObject
>>
>>
>>Agnes
>>>Hey all,
>>>
>>>Can anyone tell me what is wrong with the following compiler directive:
>>>
>>>#IF (OCCURS('VISMM.PJX', UPPER(_VFP.ActiveProject.Name)) > 0)
>>>
>>>This was going to be such a sweet way of conditionally compiling code depending on the name of the project. I am sure I can think of other ways, but this seemed the most elegant. But I get the error: "Preprocessor expression is invalid." when compiling this for the above line.
>>>
>>>OCCURS is OK, but when I try to use the _VFP.ActiveProject.Name it seems to get cranky. Can anyone tell me if this is a limitation I should be aware of? The expression:
>>>
>>>(OCCURS('VISMM.PJX', UPPER(_VFP.ActiveProject.Name)) > 0)
>>>
>>>evaluates just fine to .T. or .F. in the command window...
>>>
>>>I would appreciate any help, and thanks in advance!
>>>
>>>Thanks,
>>>JoeK
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform