Function Signature - Research Article from World of Computer Science

This encyclopedia article consists of approximately 3 pages of information about Function Signature.

Function Signature - Research Article from World of Computer Science

This encyclopedia article consists of approximately 3 pages of information about Function Signature.
This section contains 816 words
(approx. 3 pages at 300 words per page)
Buy the Function Signature Encyclopedia Article

A function is a self-contained block of code that performs a set of actions and returns a value of a known type. It is possible, but not always necessary, to pass variables into a function and have the function operate on them (even change them); it is also possible in most common computer languages to have functions that return a "void" type, which is effectively no return value at all. The chief advantage of a function is that it can be treated as a "black box" that takes a set of known inputs and produces a corresponding output.

Languages differ, but a typical function declaration and definition in C would look something like this:

  • int timeEgg(int t)
  • {
  • /* do some boiling, say. For t seconds */
  • ringBell(); /* ring the bell */
  • return t; /* returns how long it boiled for */
  • }

The function above, timeEgg(), is said to take a...

(read more)

This section contains 816 words
(approx. 3 pages at 300 words per page)
Buy the Function Signature Encyclopedia Article
Copyrights
Gale
Function Signature from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.