anchor.diff:    function TimeToString(aTime: TDateTime): UnicodeString;
     function TickToTimeStr(aTick: Cardinal): String;
   
  -  function StrToHex(S: String): String;
  -  function HexToStr(H: String): String;
  +  function StrToHex(const S: String): String;
  +  function HexToStr(const H: String): String;
   
     function WrapColor(const aText: UnicodeString; aColor: Cardinal): UnicodeString;
     function WrapColorA(const aText: AnsiString; aColor: Cardinal): AnsiString;
  
positive.code: end;
  
  
  function KaMRandom(aMax: Integer; const aCaller: String; aLogRng: Boolean = True): Integer;
  begin
    if CUSTOM_RANDOM then
      Result := Trunc(KaMRandom('I*' + aCaller, False)*aMax)
    else
      Result := Random(aMax);
  
  
negative.code: 
  
  //Returns random number from -Range_Both_Directions to +Range_Both_Directions
  function KaMRandomS2(Range_Both_Directions: Integer; const aCaller: AnsiString): Integer;
  begin
    Result := KaMRandom(Range_Both_Directions*2+1, aCaller, False) - Range_Both_Directions;
  
    LogKamRandom(Result, aCaller, 'S2I*');
  end;
  
  
  //Returns random number from -Range_Both_Directions to +Range_Both_Directions
  function KaMRandomS2(Range_Both_Directions: Single; const aCaller: AnsiString): Single;
  begin
    Result := KaMRandom(Round(Range_Both_Directions*20000)+1, aCaller, False)/10000-Range_Both_Directions;
  
    LogKamRandom(Result, aCaller, 'S2S*');
  end;
  
  
  //Returns random number from 0 to +aMax
  function KaMRandomS1(aMax: Single; const aCaller: AnsiString): Single;
  begin
    Result := KaMRandom(Round(aMax*10000), aCaller, False)/10000;
  
    LogKamRandom(Result, aCaller, 'S1S*');
  end;
  