实现打印报表结果数据加分节号
set talk off
do while .t.
mmm=0
@10,10 say'请输入转换数' get mmm
if mmm<>99999
mm=ltrim(rtrim(str(mmm,14,2)))
kk=len(mm)
kk1=kk-4
qq=int(kk1/3)
if qq>0
n=''
m=.T.
oo=1
uu=kk-(qq+1)*3
n=n+left(mm,uu)+','
qq=qq-1
do while m
if qq=0
n=n+right(mm,6)
m=.F.
else
if oo=1
uu=uu+1
n=n+substr(mm,uu,3)+','
qq=qq-1
OO=2
else
uu=uu+3
n=n+substr(mm,uu,3)+','
qq=qq-1
endif
endif
enddo
@ 11,2 clear to 14,70
@ 12,20 say n
else
@ 11,2 clear to 14,70
@ 12,20 say mm
endif
else
exit
endif
enddo
quit