home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 3
/
AnewsCD3.iso
/
DP
/
Programmation
/
PureBasic_Demo
/
Examples
/
Sources
/
LinkedList.pb
< prev
next >
Wrap
Text File
|
1999-10-10
|
803b
|
52 lines
;
; ***************************************
;
; 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