Algorithm function: Difference between revisions
Appearance
Content deleted Content added
mNo edit summary |
SimonArlott (talk | contribs) disambig Function |
||
Line 1: | Line 1: | ||
In [[programming]], 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. |
In [[programming]], 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. |
||
In contrast, a [[function]] is required to return a value. There may be some [[programming language]]s for which this is not a syntactic requirement; but that's the philosophical distinction. |
In contrast, a [[Subroutine|function]] is required to return a value. There may be some [[programming language]]s for which this is not a syntactic requirement; but that's the philosophical distinction. |
Revision as of 14:10, 29 April 2004
In programming, 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.
In contrast, a function is required to return a value. There may be some programming languages for which this is not a syntactic requirement; but that's the philosophical distinction.