SanList

# ScanList

Walks through all the nodes in a list.

### Synopsis

`ScanList ( const List *1, void *n, <node type>)`

### Description

This macro lets you easily walk through all the elements in a list from the first to the last.

Example 1: For Example

``

    List       *l;
    DataStruct *d;
    uint32      i;

    i = 0;
    ScanList(l,d,DataStruct)
    {
        printf("Node %d is called %s\n",i,d->d.n_Name);
        i++;
    }

### Arguments

l
  A pointer to the list to scan.

n
  A variable which will be altered to hold a pointer to every node in the list in succession.

<node type>
  The data type of the nodes on the list. This is used for type casting within the macro.

### Implementation

Macro implemented in list.h V22.

### Associated Files

list.h
  ANSI C Macro definition

### See Also

``ScanListB`()`

#