Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#DEFINE problem
Message
 
À
12/02/2007 16:15:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01194874
Message ID:
01194889
Vues:
5
>>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform