delphi中判断是不是null值

function st_isNull(Value,R: Variant; IsConsiderBlank: Boolean = False): Variant;
var
  str: string;
begin
  Result := Value;
  IF varIsNull(Value) Then Result := R;
  IF VarIsStr(Value) Then
  Begin
    str := Value;
    IF ((IsConsiderBlank) and (Length(Trim(str)) = 0)) Then Result := R;
  end;
end;ide

相关文章
相关标签/搜索