Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Tally and other 'global' variables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00139598
Message ID:
00139613
Vues:
30
>What is the general concensus about using the global variables such as _tally.
>
>select * from sometable into cursor somecursor
>...
>if _tally>0
>
>verses
>
>select * from sometable into cursor somecursor
>...
>if reccount("somecursor")>0
>
>
>and other constructions. I can see using _screen as it is the only way to manipulate the fox window, but what of the others? Seems to me that if there is an 'encapsulated' way of doing things, than it should be done that way.
>
>Just curious about other opinions.
>Thanks


If a memory variable exists, use it. _tally is faster than RECCOUNT("SCursor"). This assumes that you check the _tally variable before issuing another commands (To ensure that the value hasn't changed). I use _tally to get the number of records processed by SUM and TOTAL. I will use _pageno to put "page 1 of 2" on reports. I will process the report and send it to file. I then save _pageno to a variable (immediately after report is finish) which I use on the report.

STORE _pageno TO gnpgcnt
On the Report I use something like this. "Page:" _pageno " of " gnpgcnt

Hope this helps.
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform