Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#DEFINE problem
Message
 
To
12/02/2007 16:15:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01194874
Message ID:
01194889
Views:
6
>>>>Hi Gang!
>>>>
>>>>Problem today is this.......
>>>>
>>>>I wanted to change some legacy code from this......
>>>>(which is in a Form)
>>>>
>>>>
>>>>For y = 2 To 20
>>>>   blah blah blah
>>>>Endfor
>>>>
>>>>To this
>>>>
>>>>For y = 2 To MAXRXS
>>>>   blah blah blah
>>>>Endfor
>>>>
>>>>
>>>>Using a #DEFINE statment....
>>>>(located in the MAIN.prg which calls the above Form)
>>>>
>>>>#DEFINE MAXRXS 20
>>>>
>>>>When I run the code, it bombs out with a "Variable MAXRXS not found".
>>>
>>>You better create application object property. It will be visible to all forms. This property would be filled in Main.prg so you can still use #DEFINE there if you want it, though it's unneccessary.
>>
>>That would work, but this legacy program does not have an application object to hitch a ride to and pass the value off everywhere.
>>
>>Thanks!
>
>You may create it in Main.prg. It's few lines of code that will give you room for future improvements.

Ok... I'll define one and see how it works.

Thanks!
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform