Jump to content

Wrapper function

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Olaf Davis (talk | contribs) at 19:52, 15 November 2008 (Create). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

A wrapper function is a function in a computer program whose main purpose is to call a second function.[1] A common use for this is to write error checking routines for pre-existing system functions without increasing the length of a code by a large amount by repeating the same error check for each call to the function.[2] All calls to the original function can be replaced with calls to the wrapper, allowing the programmer to forget about error checking once the wrapper is written.

References

  1. ^ Reselman, Bob (1998). Using Visual Basic 6. Que. p. 446. ISBN 078971633X, 9780789716330. {{cite book}}: Check |isbn= value: invalid character (help); Unknown parameter |coauthors= ignored (|author= suggested) (help)
  2. ^ Stevens, Richard (2003). UNIX Network Programming. Addison-Wesley. pp. 5–6, 29. ISBN 0131411551, 9780131411555. {{cite book}}: Check |isbn= value: invalid character (help); Unknown parameter |coauthors= ignored (|author= suggested) (help)