Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counter probelm
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Counter probelm
Miscellaneous
Thread ID:
00522256
Message ID:
00522256
Views:
41
The counter in the program incrementing instead of reseting itself.

What I have is a cluster procedure that does not reset after the group of numbers is met.

example
group number = 12; four times and ira =I,R,N,I
WHEN PROGRAM RUNS THROUGH THE RESULT IS T_RCNT =1 AND T_ICNT =2 BUT IT DOES NOT RESET IT SELF AFTER SO FOR THE NEXT ONE T_ICNT = 3
GROUP NO = 13, TWO TIME AND IRA = I, N

*)*****************************************************************************
*) Name...........:
*) File...........:
*) Project........:
*) Created........:
*) Creator........: Peter Mayers
*) Company........: Compu-Mail
*) Copyright......: (c) Compu-Mail 2001
*) Description....:
*)
*)
*)
*)
*) Parameters.....: None
*) Returns........: None
*) Notes..........:
*)
*)
*)
**************************************************
CLOSE DATABASES

set default to getdir()

SET TALK OFF
SET SAFETY OFF

***********************
** declare variables
**
**---------------------
t_line =0
t_first =0
t_sub =0
t_sub1 =0
t_mail =0
t_group =0
t_rec =0
t_print =" "
t_new_groupno = 0
t_NeedsNewNbr = .f.
t_old_groupno = 0
dup = 0
t_rcnt = 0
t_icnt = 0

USE rifile
ZAP

USE ? in 0 alias mailfile
select mailfile


scan
if (mod(recno(), 500)) = 0
wait window nowait transform(recno()/reccount()*100,"999.99%")
endif

SCATTER memvar


IF m.group_no <> t_group
IF (t_rcnt > 0) AND (t_icnt > 0)
INSERT INTO rifile values(t_group, t_rcnt, t_icnt)
t_rcnt = 0
t_icnt = 0
ENDIF
t_group = m.group_no
t_rec = 0
t_NeedsNewNbr = .f.
IF m.ira = "R"
t_rcnt= t_rcnt + 1
ELSE
IF m.ira = "I"
t_icnt= t_icnt + 1
ENDIF
ENDIF
ELSE

IF m.ira = "R"
t_rcnt= t_rcnt + 1
ELSE
IF m.ira = "I"
t_icnt= t_icnt + 1
ENDIF
ENDIF

ENDIF


GATHER memvar

ENDSCAN
close all


Thanks

peter
Next
Reply
Map
View

Click here to load this message in the networking platform