Content deleted Content added
m Disambiguating links to Pearson (link changed to Pearson PLC) using DisamAssist. |
Modify tone |
||
Line 4:
{{anchor|SUBROUTINE_DEFINITION}}
In [[computer programming]], a '''function
|title=Terminology Glossary
|url=https://pages.nist.gov/ElectionGlossary/
Line 18:
==Terminology==
The meaning of each callable term, function
The term used tends to reflect the context in which it is used {{endash}} usually based on the language being used. For
* The terms ''routine,'' ''subroutine, or subprogram'' refer to the same meaning, but describe a hierarchical relationship, much like how a subdirectory is structurally subordinate to it's parent directory.
* Some consider ''function'' to imply a [[Function (mathematics)|mathematical function
* In the context of [[Visual Basic]], {{code|Sub}}, short for ''subroutine'' or ''subprocedure'', is the name of a callable that does not return a value whereas a {{code|Function}} does return a value -- much like [[Ada (programming language)|Ada]].▼
▲* Some consider ''function'' to imply mathematical function; no side-effects, but in many contexts (languages) ''function'' does not imply that
*
▲* In the context of [[Visual Basic]], {{code|Sub}}, short for ''subroutine'' or ''subprocedure'', is the name of a callable that does not return a value whereas a {{code|Function}} does return a value
▲* [[C (programming language)|C]] and [[C++]] have ''functions'', but related languages [[C#]] and [[Java (programming language)|Java]] use the word ''method'' for what is essentially a function that is a member of an [[Object (computer science)|object]]
==History==
The idea of a callable unit was initially conceived by [[John Mauchly]] and [[Kathleen Antonelli]] during their work on [[ENIAC]] and recorded in a January 1947 Harvard symposium on "Preparation of Problems for [[EDVAC]]-type Machines
The idea of a subroutine was worked out after computing machines had already existed for some time. The arithmetic and conditional jump instructions were planned ahead of time and have changed relatively little, but the special instructions used for procedure calls have changed greatly over the years. The earliest computers and microprocessors, such as the [[Manchester Baby]] and the [[RCA 1802]], did not have a single subroutine call instruction. Subroutines could be implemented, but they required programmers to use the call sequence—a series of instructions—at each [[call site]].
|