var BiaoZhi:integer;
begin
BiaoZhi:=0;
if Bh_edit.Text='' then
        if application.messagebox('官兵的编号不能为空!','提示信息',mb_ok+mb_defbutton1)<>idok then
            Begin
              Bh_edit.SetFocus;
              BizoZhi:=1;
            end;
        if BiaoZhi=1 then begin exit; end;
//这样不就很好,最好不要用goto,加个状态量即可

解决方案 »

  1.   

    ch81:  exit 只能退出 if 语句,不能退出整个过程。请问应该怎么办。
      

  2.   

    var label Tuichu1;
    begin
    if Bh_edit.Text='' then
            if application.messagebox('官兵的编号不能为空!','提示信息',mb_ok+mb_defbutton1)<>idok then
                Begin
                  Bh_edit.SetFocus;
                  exit;
                end;
      

  3.   

    exit就是退出过程的啊
    或者你试试abort
      

  4.   

    var label Tuichu1;
    begin
    if Bh_edit.Text='' then
    begin
       showmessage('官兵的编号不能为空!');
       Bh_edit.SetFocus;
       exit;
    end;
    end;
     
      

  5.   

    Exit怎么可能只跳出if.下面是exit的系统帮助。你看看,它是调出函数
    The Exit procedure immediately passes control away from the current procedure. If the current procedure is the main program, Exit causes the program to terminate.
      

  6.   

    if application.messagebox('官兵的编号不能为空!','提示信息',mb_ok+mb_defbutton1)<>idok then
    把<>改成 = 就行了。