Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 Tags
Subject: RE: array result issue
Thread ID: 395696 Message ID: 395710 # Views: 31 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Friday, January 17, 2014 12:27:42 PM         
   


> > LOCAL lnMhd1, lnHr1, mlntot1
> >
> > * At this point, mlntot1 equals 900,000 as expected.
> >
> > * So what is the purpose of the following line?
> > * You cannot Sum() a single variable, the line should throw an error unless
> > * there is an alias containing a column also named "mlntot1":
> >
> >
> >
> >
> >
> >
> > hth
> > -Stefan
>
>
> AFAIK it wouldn't rise an error, just will SUM variable RECCOUNT() number of times (depending of SET DELETED status and if there are deleted records)
>
> CREATE CURSOR crsTest (Fld1 I)
> FOR lnFor = 1 TO 4
>     INSERT INTO crsTest VALUES (lnFor)
> NEXT
> 
> m1 = 4
> SUM(m1) TO m2
> ? m1, m2
> 

> -----------------
> Borislav Borissov
>
> Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
> The only thing normal about database guys is their tables.


Right, it throws an error if there is no alias in the current work area, and does something like a useless expression*filtered_reccount() if there is, just as Vilhelm and you said.

(-> previous posting modified)


Regards
-Stefan

ENTIRE THREAD

array result issue Posted by Shaheryar Rashed @ 1/17/2014 11:11:21 AM
RE: array result issue Posted by Stefan Wuebbe @ 1/17/2014 11:25:59 AM
RE: array result issue Posted by Borislav Borissov @ 1/17/2014 11:38:15 AM
RE: array result issue Posted by Vilhelm-Ion Praisach @ 1/17/2014 11:53:40 AM
RE: array result issue Posted by Shaheryar Rashed @ 1/17/2014 12:08:54 PM
RE: array result issue Posted by Vilhelm-Ion Praisach @ 1/17/2014 12:25:24 PM
RE: array result issue Posted by Stefan Wuebbe @ 1/17/2014 12:27:42 PM
RE: array result issue Posted by Shaheryar Rashed @ 1/17/2014 12:12:11 PM
RE: array result issue Posted by Stefan Wuebbe @ 1/17/2014 2:06:52 PM
RE: array result issue Posted by Vilhelm-Ion Praisach @ 1/17/2014 11:36:21 AM
RE: array result issue Posted by David Mustakim @ 1/17/2014 11:38:05 AM
RE: array result issue Posted by Shaheryar Rashed @ 1/17/2014 12:06:14 PM
RE: array result issue Posted by David Mustakim @ 1/17/2014 12:31:32 PM
RE: array result issue Posted by Vilhelm-Ion Praisach @ 1/17/2014 12:23:05 PM