Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
uses system ;
|
||||
|
||||
type
|
||||
|
||||
// declare the list pointer type
|
||||
plist = ^List ;
|
||||
|
||||
// declare the list type, a generic data pointer prev and next pointers
|
||||
List = record
|
||||
data : pointer ;
|
||||
next : pList ;
|
||||
end;
|
||||
|
||||
// since this task is just showing the traversal I am not allocating the memory and setting up the root node etc.
|
||||
// Note the use of the carat symbol for de-referencing the pointer.
|
||||
|
||||
begin
|
||||
|
||||
// beginning to end
|
||||
while not (pList^.Next = NIL) do pList := pList^.Next ;
|
||||
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue