[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] CALLBACK?????????

From: David Kelly
Subject: Re: [avr-gcc-list] CALLBACK?????????
Date: Fri, 26 Aug 2005 07:37:55 -0500

On Thu, Aug 25, 2005 at 07:45:22AM -0700, User Tomdean wrote:

A callback is a function that will be called as a result of some
pre-determined event or condition.  The application code starts a
function or routine that never returns.  To get back to the
application code, the callback function is called.

For example, in networking, a callback function will be defined to be
called by the network code in response to receiving a packet.

See also the qsort() function in libc. Its arg list requires the address
of a function to call for comparing two elements one is sorting. Qsort()
doesn't have to know what it is sorting or how it is being ordered, the
comparison function is expected to know. A "callback" routine by any
other name.

Yes, the docs say qsort() sorts in ascending order, but if the
comparison function inverts its reply then the order is descending.

David Kelly N4HHE, address@hidden
Whom computers would destroy, they must first drive mad.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]