Sorted list extraction


function extract( var pq : list ) : typekey; begin if pq=nil then Error {*** Extracting from empty queue ***} else begin extract := pq^.k; pq := pq^.next end end;

Pascal source (511.extr.p)



© Addison-Wesley Publishing Co. Inc.