#exec lists
3 messages in this thread
I am using exec list handling functions to handle three separate lists. As the
program stands now, there are three sets of functions that are basically the
same; three add-to-list functions, three sort functions, etc. Is there a way
to have one function perform the same job for each list. The problem is that
each list has a different type of structure attached to it and I cannot figure
out how to cast to three different types within the same function. I suppose I
could do it with a lot of if statements but that doesn't seem much better than
what I am doing now. Any suggestions will be appreciated. Thanks, Jack
Jack,
if you were using C++ it'd be easy. Since you are using straight C,
have you give thought to having an extra parameter in your generic
function call? The parameter would specify which of the various list
types that you are dealing with at call-time.
Just a thought.
"You do trust me, don't you? Of course you do."
— "To Play the King" (BBC)