Hello Everybody,
I have the problem, that I can not use a linked list as a parameter for a function?
What is the correct syntax/declaration for such a function??
Thx
Dennis
How can I use a linked list as a parameter for a function?
all linkedlists are declared in global.
so you can access them inside procedures.
something like that :
so you can access them inside procedures.
something like that :
Code: Select all
NewList test.s()
Procedure AddItem()
AddElement( test() )
test() = "new item"
EndProcedure
AddItem()
Debug test()No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
AddElement returns a pointer to the linkedlist with containing the next and previous pointers.
Code: Select all
Structure something
a.l
EndStructure
NewList abc.something()
AddElement(abc()) ; returns ptr to list of something
abc() ; returns a ptr to something (I believe its offset of the ptr above)


