C     SLIP PROGRAM TO CREATE AND TRAVERSE A LIST
      PROGRAM LISTEX
      INTEGER HEAD, ITEM, PTR
C     INITIALIZE SLIP
      CALL SLIPINI
C     CREATE A NEW LIST
      HEAD = CREATELIST()
C     ADD ELEMENTS TO THE LIST
      ITEM = 10
      CALL INSEND(HEAD, ITEM)
      ITEM = 20
      CALL INSEND(HEAD, ITEM)
      ITEM = 30
      CALL INSEND(HEAD, ITEM)
C     TRAVERSE THE LIST
      PTR = HEAD
      DO WHILE (PTR .NE. 0)
         ITEM = GETVAL(PTR)
         WRITE(6,100) ITEM
         PTR = GETNEXT(PTR)
      END DO
  100 FORMAT(' VALUE: ', I5)
      STOP
      END
