Posted: Mon Sep 22, 2003 9:15 pm
Ohhhh, some people support Saddam, or Bush, Osama, etc. but nobody support my noble cause for request for "Pointers admission for LinkedList functions".

http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Structure LinkedString
*Next.LinkedString
*Previous.LinkedString
value.s
EndStructure
NewList Hello1.LinkedString()
NewList Hello2.LinkedString()
*ptr.LinkedString
*ptr=AddElement(Hello1())
*ptr\value = "Hello1, Item One"
*ptr=AddElement(Hello1())
*ptr\value = "Hello1, Item Two"
*ptr=AddElement(Hello1())
*ptr\value = "Hello1, Item Three"
Procedure PrintListContents(*ptr.LinkedString)
Repeat
If *ptr
Debug *ptr\value
EndIf
*ptr=*ptr\Next
Until *ptr=0
EndProcedure
PrintListContents(FirstElement(Hello1()))
Code: Select all
Structure LinkedString ;Notice that *Next and *Previous are reversed
*Previous.LinkedString
*Next.LinkedString
value.s
EndStructure