Passing a Link List (NewList) as a parameter to a function
Posted: Sat Jan 03, 2004 7:50 am
We would like to know how to past a link list created using NewList command as a parameter in a procedure call. Also we would like to know how to modify the link list inside the procedure call.
example:
somewhere in the program we call myproc procedure passing the link list
Executing this give us this error:
listptr() is not a function, an array, or a linked list
example:
Code: Select all
Structure mystruct
data1.l
data2.l
EndStructure
NewList mylist.mystruct()
Procedure myproc(*listptr)
AddElement(listptr())
listptr()\data1 = 25
listptr()\data2 = 30
EndProcedure
Code: Select all
myproc(@mylist)
listptr() is not a function, an array, or a linked list