anchor.diff:  begin Result := Inherited Write(Value, SizeOf(Value)); end;
   
   
  +procedure TKMemoryStream.Read(var Value:string);
  +var i:word;
  +begin
  +  Read(i, SizeOf(i));
  +  setlength(Value, i);
  +  Read(Value[1], i);
  +end;
  +
   function TKMemoryStream.Read(var Value:TKMPoint): Longint;
   begin Result := Inherited Read(Value, SizeOf(Value)); end;
   function TKMemoryStream.Read(var Value:single): Longint;
  
positive.code:     msgLoc:TKMPoint;
    end;
  
  type TKMMessageList = class
    public
      Count:integer;
      List:array of TKMMessage; //1..Count
      procedure AddEntry(aMsgTyp:TKMMessageType; aText:string; aLoc:TKMPoint);
      procedure RemoveEntry(aID:integer);
      procedure InjectEntry(aID:integer; aMsgTyp:TKMMessageType; aText:string);
  
negative.code: 
  
  procedure TKMMessageList.Save(SaveStream:TKMemoryStream);
  var i:integer;
  begin
    SaveStream.Write(Count);
    for i:=1 to Count do
    begin
      SaveStream.Write(List[i].msgType, SizeOf(List[i].msgType));
      SaveStream.Write(List[i].msgText);
      SaveStream.Write(List[i].msgLoc);
    end;
  end;
  
  
  procedure TKMMessageList.Load(LoadStream:TKMemoryStream);
  var i:integer;
  begin
    LoadStream.Read(Count);
    setlength(List, Count+1);
  
    for i:=1 to Count do
    begin
      List[i] := TKMMessage.Create;
      LoadStream.Read(List[i].msgType, SizeOf(List[i].msgType));
      LoadStream.Read(List[i].msgText);
      LoadStream.Read(List[i].msgLoc);
    end;
  end;
  
  