Q = getnode( ); Node[Q].Info = X; Node[Q].Next = Node[P].Next; Node[P].Next = Q;
getnode(); //returns a pointer
if Avail == 0 then return (0); P = Avail; Avail = Node[Avail].Next; return(P);
freenode(P); Node[P].Next = Avail; Avail = P;
if (P == 0) then error; else if (Node[P].Next == 0) then error; else Q = Node[P].Next; X = Node[P].Info; Node[P].Next = Node[Q].Next; call freenode;