Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AVERAGE doesn't work with NEXTand FOR: why ??
Message
From
19/12/2005 01:30:11
 
 
To
19/12/2005 01:26:53
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01079075
Message ID:
01079077
Views:
19
>hi,
>Whats wrong here ??
>
>
>create cursor foo (f1 N(2),f2 c(2))
>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")
>
>Average f1 next 2 for f2 = "BB" to m.myvar
>
>?m.myvar && this returns 0
>
>
>any thing wrong ???
>
>how to put this right ??
>
>suhashegde

Before performing the AVERAGE position your record pointer to where you want to start the function from becaase you are using "NEXT 2" and after the INSERT's you are at the last record.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform