Mail Archives: djgpp/1996/04/13/02:34:59
Reply to message 2326795 from JETMAN AT GNN DOT CO on 04/12/96 2:45AM
> John: Actually, the easier solution is the cast. The proj
>I'm working on is a legacy app (mentioned in my orig post) and the old
>fn is similar to qsort() in that it specs that one of its formal args
>is a ptr to a fn. But rather than code a three/four line wrapper every
>time I needed to use a different fn type (w/ an unsigned arg instead
>of an int) I wanted to use a cast that would be shorter to write. Of
>course, responding to the e-mail traffic from my question has negated that
>savings. :-) You're right, though, and I *did* think about usg a
>wrapper at first, then decided this was a moment to pose a question
>to the folks on the 'net and learn an obscure bit of C notation that's
>eluded me in the past.
Actually, as long as the arguments/return values for the typecasted
function have the same number of bytes as the caller expects, there
shouldn't be a problem, or at least that's the way it seemsto me...
Anyway, I'm more than glad to have been of help. :)
John
- Raw text -