{<<<< ListDispose >>>>}
{ From: COMPLETE TURBO PASCAL by Jeff Duntemann  }
{ Scott, Foresman & Co. 1986  ISBN 0-673-18600-8 }
{ Described in section 19.2 -- Last mod 2/1/86   }

PROCEDURE ListDispose(VAR Root : NADPtr);

VAR 
  Holder : NADPtr;

BEGIN
  IF Root <> Nil THEN         { Can't dispose if no list!   }
    REPEAT
      Holder := Root^.Next;   { Grab the next record...     }
      Dispose(Root);          { ...dispose of the first...  }
      Root := Holder          { and make the next the first }
    UNTIL Root = Nil
END;
