Demonstration of effect of simple operations upon the Double Linked List (DLL)  with the graphic representation.

DInitList(DLL);      - The result is the empty list. This operation is obligatory prior to the starting the activity with the new SLL. 

Creates empty list. DLL. Both starting pointer Frst and ending pointer Lst point to nothing (nil).

DInsertFirst (DLL,'A');   Inserts value 'A' as the first item to the empty list

Points to nothing
(nil)

Points to nothing (nil)

DFirst(DLL);  Makes the first item active (dashed filling means "active item").

Points to nothing
(nil)

Points to nothing (nil)

Dashed means "active"

DInsertFirst(DLL,'X');	Operation inserts item with the value 'A' as the first item

DPostInsert(DLL,'Y');	Operation inserts item 'Y' after the active item.

DSucc(DLL);			DSucc moves activity to the next item 'Y'.
DPreInsert(DLL, 'B');	PreInsert inserts item 'B' before the active item.

DPred(DLL);			DPred returns activity to the preceding item 	
DPreDelete((DLL);		DPredelete deletes item preceding the active item

DCopy(DLL, Value);	DCopy returns value of the active item. An attempt to read the value from not active list results in error!

DCopy returns value 'B' in the variable Value

DPred(DLL);			Move  of activity to the left.	Attempt to move activity to the left from the first active item leads to loss of activity (list becomes not active)
DPostDelete(DLL);		Deleting the item after active item. Attempt to use of PostDelete operation in the not active list or attempt to delete item after the last active item has no effect (no operation - no error).

DDeleteFirst(DLL);		Deletes the first and active item. Results in not-active list.
DCopyLast(DLL, Value);	Returns the value of item 'Y'. In this situation the DCopyLast has the same effect like DCopyFirst as list contains only one element which is the first and the last at the same time. An attempt to use the operation DDeleteFirst or DDeleteLast upon the empty list results in the error!

DCopyLast returns 'Y' in the variable Value

DDeleteLast(DLL);	In this situation the DDeleteLast has the same effect as DDeleteFirst as the list contains only one element which is the first and the last at the same time.

DDeleteLast removes the last (and the first item and creates the empty list