回复 3楼 厨师王德榜
LOCAL row1 As Integer, row2 As Integer, irow As Integer, iArray As Integer
row1 = 1
USE 预测
blank all fields 本期投注
row2 = reccount()+1
DIMENSION qqq(7)
LOCAL lCanChipin As Boolean
qqq(1)=1
qqq(2)=2
qqq(3)=4
qqq(4)=8
qqq(5)=18
qqq(6)=38
qqq(7)=82
irow = row1
DO while irow < row2
If lCanChipin Then
iArray = 0
ENDIF
ENDDO
Do while iArray < alen(qqq)
UPDATE 预测 SET 本期投注=qqq(iArray) WHERE RECNO()=irow
If 结果=.t. THEN
iArray = 0
Else
iArray = iArray + 1
EndIf
If iArray <= alen(qqq) Then
irow = irow + 1
LOOP
If 结果=.f. THEN
lCanChipin = False
Else
EndIf
irow = irow + 1
Else
If 结果=.f. THEN
UPDATE 预测 SET 本期投注=0 WHERE RECNO()=irow
Else
UPDATE 预测 SET 本期投注=0 WHERE RECNO()=irow
lCanChipin = True
EndIf
irow = irow + 1
ENDIF
LOOP
太难了,写到这儿不会写了,VB和VF还是有很大差距的,没有Do Until这个命令,老师帮忙再看下,VFP如何改,谢谢了!
[此贴子已经被作者于2019-12-7 10:48编辑过]