Is there an equivalent on C# Stack in Lazarus Pascal? lazarus / 21-General ---------------------------------------------------------------------- Dzandaa · 2021-07-06 11:22 Hi everybody, I'm migrating from C# to Pascal Lazarus for system portability. My problem: in C# I have a list of Points in a Stack: Stack pixels = new Stack(); And I can push and Pop points from that Stack Point Pt = new Point(10, 10); pixels.Push(pt); Point pt = pixels.Pop(); Etc... Is there any equivalent in Lazarus? I have some TPoint and I want to do the same. Any example would be welcome. ---------------------------------------------------------------------- Leledumbo · 2021-07-06 12:10 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode objfpc} uses  Classes, // TPoint, Point()  Generics.Collections; // TStacktype  TPointStack = specialize TStack;var  p1,p2: TPoint;  s: TPointStack;begin  s := TPointStack.Create;  try    p1 := Point(10,10);    s.Push(p1);     p2 := s.Pop;    WriteLn(p2.x,' ',p2.y);  finally    s.Free;  end;end. ---------------------------------------------------------------------- Dzandaa · 2021-07-06 12:44 Hi, Just what I need Thank you very much!!!