Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Runtime variable
Message
De
12/02/2009 14:44:39
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01381273
Message ID:
01381402
Vues:
73
>The variable would be created private using this code and it may be not the intent.

It's easy to make it local.

temp.prg
LOCAL lcVar
lcVar = "somevar"
LOCAL (m.lcVar)
STORE 12 TO (m.lcVar)
SET STEP ON && check that somevar was created here.
DO TEMP1

temp1.prg
SET STEP ON && check if somevar is private.

"somevar" is local as it is not in temp1.

Lesson is avoid macro sub unless it's the only way.

>
>>Extra variable, macro substitution. Why so complicated?
>>
>>CREATE CURSOR crsTest (MyFld C(20))
>>INSERT INTO crsTest VALUES ("TestVariable")
>>STORE 200 TO (ALLTRIM(MyFld))
>>
>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform