男cosplay化妆教程:vfp6.0程序实例

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 19:51:36
谁有vfp6.0 的实例代码?给回几个,谢谢
具体的一个系统的例子 最好是某个应用系统的制作的具体代码
说的清楚点 谢谢了

你也太懒了吧。

给你几个

*反过来显示字符
ss='我是猪'
?ss
for aa=5 to 1 step -2
?substr(ss,aa,2)
endfor

* 尝试独占数据库,若失败提示重试.独占成功后返回.t.
* 选[否定/放弃]则返回.f.
DName=DBF()
Rec =recn()
Ndx ='Set Index to '+Ndx (Sele())
Odr ='Set Order to '+Orde(Sele())
Ftr ='Set Filte to '+Filt(Sele())
Err ='On Error '+On ('Error')
Mss ='['+DName+']非独占,下面的操作需独占此库,重试吗?'
On Erro ??chr(7)
do while Sys(2011,DName)#'Exclusive'
use &DName Exclusive
if Sys(2011,DName)#'Exclusive'
use &Dname
if yesno_(0,Mss)=0
Mss='不能独占,数据库正被其他用户或程序使用.选[确定]重试.'
Loop
endif
endif
Exit
enddo
On Erro
if Rec<=recc()
Goto Rec
endif
&Ndx
&Odr
&Ftr
&Err
return Sys(2011,DName)='Exclusive'

*数组排序
dimension a(10)
a(1)=142
a(2)=120
a(3)=452
a(4)=23
a(5)=89
a(6)=42
a(7)=865
a(8)=140
a(9)=453
a(10)=147
for rr=1 to 10
?a(rr)
endfor
for bb=9 to 1 step -1
for aa=1 to bb
xxx=a(aa)
if a(aa)>a(aa+1)
a(aa)=a(aa+1)
a(aa+1)=xxx
endif
endfor
endfor
for rr=1 to 10
?a(rr)
endfor