PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT text1 AS textbox WITH ;
Height = 20, ;
Left = 72, ;
Top = 36, ;
Width = 100, ;
...
* 测试表
CREATE CURSOR T (BH C(4),B1 N(4),B2 N(4),B3 N(4),B4 N(4))
INSERT INTO T VALUES ([0001],1200,1000,800,600)
INSERT INTO T VALUES ([0002],1100,900,700,500)
INSERT INTO T VALUES ([0003],1900,1700,1500,1300)
SELECT *,000000 小计 FROM T INTO CURSOR TEMP READWRITE
LCSTR=[]
* 生成字段名列表
FOR I=...
clear
for i=1 to 100
k=0
cstr=""
for j=1 to i-1
if i % j=0
k=k+j
cstr = cstr+alltrim(str(j))+","
endif
endfor
if k=i
?str(i) +" 完数 :" +left(cstr,len(cstr)-1)
endif
endfor
oSpeech = CreateObject("SAPI.SpVoice") &&连接到系统的语音功能
sWord='中华人民共和国'&&被阅读的字串
oSpeech.Speak(sWord) &&让系统读出字符串里的内容
oSpeech=NULL &&阅读完毕
clear
input "输入行数:" to n
dime a(n,n)
for i=1 to n
?space((n-i)/2*5)
for j=1 to i
if j=1 or i=j
a(i,j)=1
else
a(i,j)=a(i-1,j-1)+a(i-1,j)
endif
??str(a(i,j),5)
endfor
?
endfor
clear
cstr="abc32skfkj262ksf8k99kfsk24kf"
cstr1=""
ncount=0
nsum=0
ok=.f.
for i=1 to len(cstr)
a=substr(cstr,i,1)
if isdigit(a)=.t.
cstr1=cstr1+a
ok=.t.
else
if ok=.t.
nsum=nsum+val(cstr1)
cstr1=""
ok=.f.
...