Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AVERAGE doesn't work with NEXTand FOR: why ??
Message
De
19/12/2005 08:15:10
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
À
19/12/2005 07:56:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01079075
Message ID:
01079140
Vues:
38
create cursor foo (f1 N(2),f2 c(2))
insert into foo values(1,"AA")
insert into foo values(2,"AA")
insert into foo values(3,"BB")
insert into foo values(2,"AA")
insert into foo values(3,"BB")
insert into foo values(2,"AA")
insert into foo values(3,"BB")
insert into foo values(2,"AA")
LOCATE  && <------------------------------------------------- add this here

Average f1 next 2 for f2 = "BB" to m.myvar
?m.myvar 
this returns 0
but
locate for f2 = "BB"  &&& i figured it out later
Average f1 next 5 for f2 = "BB" to m.myvar
?m.myvar ---  returns 3+3/2 actually an average
locate for f2 = "BB"
Average f1 next 3 for f2 = "BB" to m.myvar
?m.myvar ---  returns 3 as average because it is 3/1
thanx

suhashegde
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform