Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No Duplicates
Message
 
 
À
05/05/2010 12:00:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01462570
Message ID:
01463258
Vues:
25
Which version did you pick - the original or new one? In the new one (simpler, IMHO) pnRec initially is set to 0.

In the original it was set to -1 initially.

The idea again is

if we're in the same group, then simply increment pnRec. Once the group changes, reset pnRec to 1.

I'm using NVL because _VFP.SetVar returns NULL. So, it is a function call inside the IIF test.

It may be not a very good code and could be possible broken. Write your own code using scan/endscan instead.

>yay it works!!! you>all
>but im still trying 2 understand the logic.
>
>lets say we have three instances of the name Peter.
>NVL(_VFP.setvar('pnRec',,.mpnREC+1),) this first expression evaluates to Zero right? (i changed ur pnrec to -1) an expression 2 is=1 therefore the 1st instance of peter gets 1.
>Line 2
>nvl(_VFP.SetVar('pcName',crsTest.fName),1) Expression 1 is 0 or null? so we move to expression 2 to which is 1.
>so 1 * 1 since we moved too expression 2 * by pnrec+1
>
>?
>is this close to it? btw im reffering too your commented code
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform