Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using preprocessed directive in a property?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01504362
Message ID:
01504365
Vues:
65
It's not going to work. The Preprocessor directives are resolved at compile time. You can store the value in another property
this.AnotherProperty = CC_CODE
...
this.pass_code = this.AnotherProperty
>
>In an INIT method of a class the code sets a value of a property from a compile-time constant.
>Here is an example:
>
>The include file has a line:
>#define CC_CODE 37
>
>Then at run time, in the INIT method, the value is assigned to a property as following:
>this.pass_code = CC_CODE
>
>I would like to store the word "CC_CODE" in another property of this class so that instead of hard-coding the name, it would work as following (pseudo code):
>
>At design time set value of some property as:
>this.name_in_include_file = "CC_CODE"
>
>At run time process this name to the value defined in the include file:
>this.pass_code = this.name_in_include_file
>
>But it does not work. I tried to use EVALUATE() but it does not work either.
>
>Any suggestions? TIA.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform