Jump to content

Algorithm function

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tennessee~enwiki (talk | contribs) at 05:29, 28 April 2004. 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)

This topic is essentially a furphy. A function and an algorithm are two different descriptions of the same kind of thing. It is a little like saying a spherical box.

An algorithm is roughly synonymous with a method. An algorithm / method may return some kind of value to the calling code, but is essentially a block of code used to perform a series of actions or modifications.

To contrast, a function is something which is required to return a value. It is probably true that there are some programming languages for which this is not a syntactic requirement, but that's the philosophical distinction.

This may be a disambiguation page.