본문 바로가기

Delphi/간단하게

간단하게 Null값 체크하고 Default 설정하기

function IsNull(AValue, ADefault: Variant): Variant;
begin
  if VarIsNull(AValue) then
    Result := ADefault
  else
    Result := AValue;
end;
반응형