Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using preprocessed directive in a property?
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01504362
Message ID:
01504365
Views:
64
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform