4.3.9 Is empty

Checking whether a list is empty is to check whether first is NULL.

The C implementation is as follows:

int List_isempty(struct List *pList)
{
  return ((struct _List *)pList)->first == NULL;
}



Copyright © 2006-09-27 by Tak Auyeung