- C/C++ code
string ls_bookid,ls_title,ls_memberid,ls_membernamedate ld_date1,ld_date2int li_daysdec ld_fine,ld_countfineld_date2=today()//获得当前日期ls_bookid=trim(this.text)//获得“图书编号”//根据“图书编号”查询出“借阅日期”SELECT loandateINTO :ld_date1FROM loanWHERE bookid=:ls_bookid;//查询“免费天数”、“罚金规定”SELECT days,fineINTO :li_days,:ld_fineFROM regular;//计算罚金ld_countfine=countfine(li_days,ld_fine,countday(ld_date1,ld_date2))//查询“图书名称”SELECT titleINTO :ls_titleFROM bookinfoWHERE bookid=:ls_bookid;//查询“借阅人号”、“借阅人姓名”SELECT memberid,membernameINTO :ls_memberid,:ls_membernameFROM memberinfoWHERE memberid in(SELECT memberidFROM loanWHERE bookid=:ls_bookid);if sqlca.sqlcode<>0 thenmessagebox("系统提示","没有借阅信息!")sle_bookid.setfocus()returnelsesle_title.text=ls_titlesle_memberid.text=ls_memberidsle_membername.text=ls_membernameif sle_fine.enabled=true then sle_fine.text=string(ld_countfine)end if
说有语法错误 error C0031 :Syntax error
大家帮帮嘛,看了好久自己也没发现。
------解决方案--------------------
后面少了个end if 吧