Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro - substitution
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00638541
Message ID:
00638546
Views:
23
The problem is all this is done at COMPILE time, not runtime. So TITLEFORM_1, TITLEFORM_2, TITLEFORM_n must explcitly exist in your code at compile time in order for these constants names to be replaced by the values in your include file.

Since you have so many, you would be better off putting these values in a table and not use constants.

>I have a few constants that are defined in a #inlcude file
>ie.. TITLEFORM_1 to TITLEFORM_only God knows the count
>I want to be able to do a loop to actually get what is in TITLEFORM_1 or whatever.
>
>I have the following
>
>FOR lnNum_form = 1 to MAX_FORMS
>   myTITLE = 'THIS.r_aForms[lnNum_form,1] = TITLEFORM_'+alltrim(str(lnNum_form))
>   * Do other stuff
>endfor
>
>I have tried &myTitle,(myTitle), and EVALUATE(myTitle). I jast get an error that says TITLEFORM_1 is not found.
>
>Question:
>if TITLEFORM_1 = 'Rice Form', how can I make myTitle = 'RICE FORM' and Not "TITLEFORM_1"
>
>Thanks in advance
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform