ListLen
ListLen
Description
Number of items in list.
Parameters
| Name | Direction | Description |
|---|---|---|
l |
in | List to query. |
Success
Length of list.
Failure
Function cannot fail.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
List.Access.c:14:
static bool test_list_len_empty(void) {
WriteFmt("Testing ListLen and ListEmpty\n");
typedef List(int) IntList;- In
List.Access.c:19:
IntList list = ListInit();
bool result = (ListLen(&list) == 0);
result = result && ListEmpty(&list);- In
List.Access.c:25:
ListPushBackR(&list, 20);
result = result && (ListLen(&list) == 2);
result = result && !ListEmpty(&list);- In
List.Access.c:29:
ListClear(&list);
result = result && (ListLen(&list) == 0);
result = result && ListEmpty(&list);- In
Access.h:33:
/// TAGS: List, Empty, Query
///
#define ListEmpty(l) (ListLen(l) == 0)
///
Last updated on