home *** CD-ROM | disk | FTP | other *** search
- ;
- ; ***************************************
- ;
- ; Linked List example file for Pure Basic
- ;
- ; © 1999 - Fantaisie Software -
- ;
- ; ***************************************
- ;
- ;
-
- Structure MyList
- Pad.w
- Name.s
- EndStructure
-
- NewList TestList.MyList()
-
- AddElement(TestList())
- TestList()\Name = "Hello"
-
- AddElement(TestList())
- TestList()\Name = "World"
-
- AddElement(TestList())
- TestList()\Name = "CooooL"
-
- FirstElement(TestList())
- KillElement (TestList())
-
- ResetList (TestList())
- FirstElement(TestList())
- LastElement (TestList())
-
- AddElement(TestList())
- TestList()\Name = "I'm Here"
-
- ResetList(TestList())
-
- While NextElement(TestList())
- NPrint(TestList()\Name)
- Wend
-
- NewList Trial.s()
-
- PrintNum(CountList(TestList())) : NPrint("")
-
- FirstElement(TestList())
- PrintNum(ListIndex(Trial())) : NPrint("")
-
- End
-