如题

解决方案 »

  1.   

    什么串?
    字符串?if strvar='' then showmessage('it is nil');
      

  2.   

    var
      s: string;
    begin
      if s is null then
      begin
      end;
      if s = null then
      begin
      end;
      if s = '' then
      begin
      end;
    end;
    我怎么觉得字符串好像没有Null的值呀
      

  3.   

    Stirng:Lenght(Str) = 0
    Variant: VarIsNull or VarIsEmpty
    Object: not Assigned()
      

  4.   

    String: Length(Str) = 0
    Variant: VarIsNull() or VarIsEmpty
    Object: not Assigned()
      

  5.   

    呵呵,我以前是用C++Builder,在C++中串是否为空就是是否等于NULL,但在Delphi中不能写str <> nil,所以我就不懂了,刚才我试了下,str <> ''就行了,还是谢谢大家,给分了,分少,请别见怪!还是非常感谢netwizard(流星雨),你让我又学到了些东西!
      

  6.   

    var
    str:string;
    begin
    if str=nil then
    begin
        你的动作;
    end
    else
    begin
        你的动作;
    end;
    end;