Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where Should Public Variables be Placed
Message
De
17/06/2013 15:30:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01576563
Message ID:
01576577
Vues:
59
Sorry, I didn't got that.

Suppose I am getting a value say _MonthPeriod='April' and _YearPeriod=2013 from CLICK event of COMBO1 and COMBO2 in my FORM1. and Than When I press COMMAND1 some calculation is performed and REPORT FORM .... Command is executed. In My Report File I have _MonthPeriod and _YearPeriod fileds. But they are displayed blank if I dont declare _MonthPeriod and _YearPeriod as PUBLIC somewhere initially,

So I am bound to declare them as Public here. Is it not so ? Also can you please Expalin(preferbly by an example) that what exactly is difference between LOCAL, PUBLIC,PRIVATE AND GLOBAL? Where and How they should be used






>>I am working on a small application. On my Form I have to select The Month and the year. Suppose I select Month as april and year as 2013. I need to print the same on my report file (.frx).
>>
>>So,
>>
>>(1) Do I need to declare them as Public ?
>>(2) Where should I place or declare them in my program(prg) or .H file or somewhere else ?
>>(3) I have heard that In forms also variable are declared as Public, if Yes How and whats the method.
>>
>>Kinldy Guide
>>Harsh
>
>You don't have to declare them public. You can declare them local prior to calling the report REPORT FORM command and they will be visible in the report. In worse case scenario you may declare them private.
Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform