Article ID: 124402
Article Last Modified on 2/12/2007
CLEAR CLEAR ALL SET DEFAULT TO SYS(2004)+"tutorial" match=0 max_match=3 prev_state="None" first_call=.T. SELECT state FROM customer ORDER BY state INTO CURSOR tmp1 SELECT state FROM tmp1 WHERE mycount() FUNCTION mycount DO CASE CASE first_call && Condition 1 first_call = .F. CASE (state = prev_state) AND (match < max_match) && Condition 2 match = match + 1 CASE state != prev_state && Condition 3 prev_state = state match = 1 CASE match >= max_match && Condition 4 RETURN .F. OTHERWISE WAIT WINDOW "Untested condition occurred, result may not be correct!" ENDCASE RETURN .T.
CLEAR
CLEAR ALL
SET DEFAULT TO SYS(2004)+"Samples\Data"
match=0
max_match=3
prev_to_country="None"
first_call=.T.
SELECT to_country FROM orders ORDER BY to_country INTO CURSOR tmp1
SELECT to_country FROM tmp1 WHERE mycount()
FUNCTION mycount
DO CASE
CASE first_call && Condition 1
first_call = .F.
CASE (to_country=prev_to_country) AND (match<max_match) && Condition 2
match = match + 1
CASE to_country != prev_to_country && Condition 3
prev_to_country = to_country
match = 1
CASE match >= max_match && Condition 4
RETURN .F.
OTHERWISE
WAIT WINDOW "Untested condition occurred, result may not be correct!"
ENDCASE
RETURN .T.
Additional query words: VFoxWin FoxWin 2.50
Keywords: kbcode KB124402