Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comments for each line
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00574392
Message ID:
00574537
Vues:
25
>>Here is the interesting part (at least to me). After this is executed, the variables j and i will not exist, because the will have lost scope. IOW, VFP treats this the same as running a program file. So, if you want a variable to still exist after doing something like this, you have to give it a value before you execute the multi-line selection.
>>
>>I'll sometimes do SCAN/ENDSCAN loops in the command window when I just want to do a one shot deal.
>>
>>Anyway, my apologies for wasting your (and my *grin*) time if you already knew this...
>
>What VFP is doing, that it creates a temporary PRG file with the selected code, compiles it and executes. That's why the variables declared in the selected code are not available after the execution (unless they were declared before from the command window, or were declared PUBLIC).

That's why I prefer to execute the multiline code from PRG, especially in versions prior to VFP 7 where it does not keep the content of the command window.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform