Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.203 Beiträge
 
Delphi 12 Athens
 
#6

AW: Generics Fehler in TQueue?

  Alt 27. Feb 2012, 11:52
Zitat:
Delphi-Quellcode:
  { Show the last enqueued element without modifying the Queue. }
  MessageDlg('First enqueued element is: "' + Queue.Peek() + '".', mtInformation, [mbOK], 0);
 
  ...
 
  { Show the last enqueued element by modifying the Queue. }
  MessageDlg('First enqueued element is: "' + Queue.Dequeue() + '".', mtInformation, [mbOK], 0);
Oder eine kleine Änderung und schon paßt es:
Delphi-Quellcode:
  { Show the last enqueued element without modifying the Queue. }
  MessageDlg('First element is: "' + Queue.Peek() + '".', mtInformation, [mbOK], 0);
 
  ...
 
  { Show the last enqueued element by modifying the Queue. }
  MessageDlg('Enqueued element is: "' + Queue.Dequeue() + '".', mtInformation, [mbOK], 0);
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat