# 是我疯了，还是vfp疯了 后续问题

yunle370 2009-12-17 04:35:19

DECLARE aa(6)
FOR x=1 TO 6
DO WHILE .t.
aa=0
xx=RAND()
CLEAR
?xx
IF (xx <0.34) AND (xx>0)
??xx,100*xx,INT(xx*100)
xx=INT(xx*100)
IF xx=0
WAIT
ENDIF
h1=0
IF x>1
FOR h=1 TO x-1
IF xx=aa(h)
h1=h1+1
ENDIF
ENDFOR
ENDIF
ELSE
LOOP
ENDIF
ENDDO
ENDFOR
...全文
61 7 打赏 收藏 举报

7 条回复

yunle370 2009-12-17
• 打赏
• 举报

WWWWA 2009-12-17
• 打赏
• 举报

SET DECIMALS TO 12

xuzuning 2009-12-17
• 打赏
• 举报

SET FIXED ON
DECLARE aa(6)
FOR x=1 TO 6
DO WHILE .t.
aa=0
xx=RAND()
CLEAR
?xx
IF (xx <0.34) AND (xx>0)
??xx,100*xx,INT(xx*100)
SET DECIMALS TO 10
? '=>',xx,100*xx,INT(xx*100)
SET DECIMALS TO 2

xx=INT(xx*100)
IF xx=0
WAIT
ENDIF
h1=0
IF x>1
FOR h=1 TO x-1
IF xx=aa(h)
h1=h1+1
ENDIF
ENDFOR
ENDIF
ELSE
LOOP
ENDIF
ENDDO
ENDFOR
ACMAIN_CHM 2009-12-17
• 打赏
• 举报

WWWWA 2009-12-17
• 打赏
• 举报

xx=INT(xx1*100/100)

yunle370 2009-12-17
• 打赏
• 举报

[Quote=引用 1 楼 wwwwa 的回复:]

[/Quote]
IF (xx <0.34) AND (xx>0)
??xx,100*xx,INT(xx*100)
xx=INT(xx*100)

WWWWA 2009-12-17
• 打赏
• 举报

2573

VFP，是Microsoft公司推出的数据库开发软件，用它来开发数据库，既简单又方便。

2009-12-17 04:35