anchor.diff:  function VarRecToVariant (AValue : TVarRec) : Variant;
   
   function CompareVariants (aVal1, aVal2 : variant) : integer;
  +
  +// cloned from LCLProc unit but with OnCompare procedure that can be a method of a class
  +// this to avoid singleton dilemma when comparing operations needs extra data
  +// as in virtualdataset Sort method and it is possible to write thread-safe code without shared singleton resources
  +// http://lazarus-ccr.sourceforge.net/docs/lcl/lclproc/mergesort.html
  +procedure MergeSort(List: TFPList; const OnCompare: TListSortCompare);
   
   {$IFDEF FPC}
   function CharInSet(C: Char; const CharSet: TSysCharSet): Boolean;
  
positive.code:     Result := 1;
  end;
  
  
  initialization
    Randomize;
  
negative.code:   {$MODE DELPHI}
  {$ENDIF}
  
  uses Classes, SysUtils, Variants;
  
  const
    TheDayWhenTimeStarted = 730120; //01/01/2000 (starting from 01/01/01)
  
  type
    TListSortCompare = function (Item1, Item2: Pointer): Integer of object; // cloned from LCLProc but with 'of object'
  
  function GenerateRandomIdString : string; overload;
  function GenerateRandomIdString(aLength : integer): string; overload;
  
  