Chris said: >A related question: does a 'local' linked list (which was build in one >function - for example with a 'for-next'-struct) still exist so that the >first item may be passed as a functions parameter to another function which >can can use the items from the linked list? It depends on what kind of memory the list is stored in. If it's in DIMmed vars, they exist until the function that created them ends, so they can be passed. If it's in a handle or pointer, it will exist until your code kills it. As you probably know, it is possible to pass entire arrays. > >[this way it would be possible to just pass one parameter and still have >all data from the linked list available to the called funtion] > >local fn calledFN(firstItem&) > 'do something with linked list >end fn > >local fn callingFN > for x = 1 to y > 'build linked list > next x > fn calledFN(firstItem&) >end fn > >But then: perhaps it isnt such a good idea as there is probably a big >penalty in terms of time and memory involved... In many cases that is true. That's where XREF@ is so handy. Just one handle to pass; little or no copying of data. 0"0 =J= a y "