Re: Help needed with walk_dir()
- Posted by hacker Aug 04, 2010
- 1096 views
said...
The routine_id is used as a sort of pointer-to-a-function, that you can use to tell another function to use this function for a certain operation. The custom_sort() is a great example of this - the sorting algorithm stays the same, but you can use a custom comparison function for the items being sorted. So to sort directory items by date, we need a function that compares the date fields from two directory items, and then use the routine_id of that function with custom_sort().
Thanks Peter, this is useful. Having never learned C or lower-level stuff my understanding of pointers is hazy, but I can see that it's needed at times to get the most out of Euphoria.