这是一个学生学籍系统的查询模块!老师让解释!请大家帮我翻译一下!谢谢!
set talk off
set delimiter off
set safety off &&重建索引时不提示覆盖
dd=1
@row()+1,17 say"请输入功能号" get dd pict "9" rang 0,4
read
do case
case dd=0
clear
do a:\main
retu
case dd=1
clear
n1=spac(2)
@4,20 say"请输入学号" get n1
read
use a:\xj inde a:\xh &&打开数据库文件xj.dbf并打开按学号建立的索引文件xh.idx
find &n1 &&查找字符串n1,&为宏替换
case dd=2
clear
n2=spac(6)
@4,10 say"请输入姓名" get n2
read
use a:\xj inde a:\xm
find &n2
case dd=3
clear
n1=spac(2)
n2=spac(6)
@4,10 say"请输入学号" get n1
@5,10 say"请输入姓名" get n2
read
use a:\xj inde a:\xhxm
n4=n1+n2
find &n4
case dd=4
clear
n1=spac(2)
n2=spac(6)
n3=spac(2)
@3,10 say"请输入学号:" get n1
@4,10 say"姓名:" get n2
@5,10 say"性别:" get n3
read
loca for 学号=n1.and.姓名=n2.and.性别=n3 &&查找条件是学号为n1并且姓名为n2并且性别为n3的
记录
othe
retu
endc
if eof() &&如果已到文件尾
clea
wait'对不起!没找到。请按任意键返回!'
loop
endif
cc=.t.
y=" "
do while cc
set devi to scre &&设置屏幕显示字符
clea
@row(),5 say"学号:"+学号
@row(),40 say"姓名:"+姓名
@row()+1,5 say"性别:"+性别
@row()+1,5 say"出生年月:"+dtoc(出生年月)
@row()+1,5 say"邮编:"+邮编
@row()+1,5 say"高数:"+str(高数)
@row()+1,5 say"英语:"+str(英语)
@row()+1,5 say"VFP:"+str(vfp)
@row(),40 say"是否党员:"+是否党员
@row()+1,5 say"电话:"+电话
@row(),40 say"通信地址:"+通信地址
@row()+1,5 say"备注:"+备注
@20,20 say"不继续查找打N,否则打任一键" get y
read
if y="N".or.y="n"
clear
stor.f.to cc
loop
else
endif
if.not.eof()
loop
endif
stor.f.to cc
enddo
stor.f.to c
enddo
use
do a:\main
[此贴子已经被作者于2006-1-4 22:12:41编辑过]