Callback (computer programming)

From Wiki @ Karl Jones dot com
Revision as of 13:41, 18 August 2016 by Karl Jones (Talk | contribs) (Created page with "In computer programming, a '''callback''' is a piece of executable code that is passed as an argument to other code, which is expected...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In computer programming, a callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time.

Description

The invocation may be immediate as in a synchronous callback, or it might happen at a later time as in an asynchronous callback.

In all cases, the intention is to specify a function or subroutine as an entity that is, depending on the language, more or less similar to a variable.

Programming languages support callbacks in different ways, often implementing them with subroutines, lambda expressions, blocks, or function pointers.

See also

External links