function OleVarToStr(const V: OleVariant): string;
begin{$IFDEF DELPHI_6_UP}
if VarIsStr(V) or VarIsNumeric(V) or (VarType(V) = varDate) then
Result := V
else
Result := '';{$ELSE}
if VarIsNull(v) then
Result := '' else
Result := string(V){$ENDIF}end;
这段代码能解释下吗???主要什么功能