注册 登录
编程论坛 Delphi论坛

代码错在哪里?

qpfmates 发布于 2008-10-24 18:32, 984 次点击
if chk1.Checked then
  str:=str+'and bk_name='''+edt10.Text +''' ';
  if chk2.Checked then
  str:=str+'and bk_writer='''+edt11.Text +'''';
  if chk3.Checked then
  str:=str+'and ISBN='''+edt12.Text +'''';
  Delete(str,1,4);


为什么是4,删除字符串delete(str,1,4)我定义字符串为空字符串
3 回复
#2
ruanjian21102008-10-24 18:40
设置断点,单步运行调试,可以很清楚的看到结果啊!
#3
gaby72008-10-24 20:33
呃..还没明白你的意思...
#4
qpfmates2008-10-26 18:17
Delete(str,1,4);
括号中为什么是4?
1