Singly-linked list/Element definition: Difference between revisions

no edit summary
m (→‎[[C plus plus|C++]]: missing semicolon in C++ code and typo in text)
No edit summary
Line 53:
 
Note that the generic version works for any type, not only integral types.
 
==[[Delphi / Object Pascal / Turbo Pascal / Standard Pascal]]==
[[Category:Delphi]]
 
A simple one way list. I use a generic pointer for the data that way it can point to any structure, individual variable or whatever.
 
Type
pOneWayList = ^OneWayList;
OneWayList = record
pData : pointer ;
Next : pOneWayList ;
end;
Anonymous user