GetPrevNode

Gets the previous element of the list.

CObject*  GetPrevNode()

Return Value

Pointer to the previous element - successful, NULL - cannot get a pointer.

Example:

//--- example for CList::GetPrevNode() 
#include <Arrays\List.mqh> 
//--- 
void OnStart() 
  { 
   CList *list=new CList; 
   //--- 
   if(list==NULL
     { 
      printf("Object create error"); 
      return
     } 
   //--- add list elements 
   //--- . . . 
   CObject *object=list.GetPrevNode(); 
   if(object==NULL
     { 
      printf("Get node error"); 
      delete list; 
      return
     } 
   //--- use element 
   //--- . . . 
   //--- do not delete element 
   //--- delete list 
   delete list; 
  }