Function (computer programming)
In computer programming, a function or subroutine (when it doesn't return a value) is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. A function is often coded so that it can be started several times and from several places during one execution of the program, including from other functions, and then branch back (return) to the next instruction after the call, once the function's task is done.
- Comment
- enIn computer programming, a function or subroutine (when it doesn't return a value) is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. A function is often coded so that it can be started several times and from several places during one execution of the program, including from other functions, and then branch back (return) to the next instruction after the call, once the function's task is done.
- Date
- enNovember 2015
- Has abstract
- enIn computer programming, a function or subroutine (when it doesn't return a value) is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions may be defined within programs, or separately in libraries that can be used by many programs. In different programming languages, a function may be called a routine, subprogram, subroutine, method, or procedure. Technically, these terms all have different definitions, and the nomenclature varies from language to language. The generic umbrella term callable unit is sometimes used. A function is often coded so that it can be started several times and from several places during one execution of the program, including from other functions, and then branch back (return) to the next instruction after the call, once the function's task is done. The idea of a function was initially conceived by John Mauchly during his work on ENIAC, and recorded in a January 1947 Harvard symposium on "Preparation of Problems for EDVAC-type Machines". Maurice Wilkes, David Wheeler, and Stanley Gill are generally credited with the formal invention of this concept, which they termed a closed sub-routine, contrasted with an open subroutine or macro. However, Alan Turing had discussed functions in a paper of 1945 on design proposals for the NPL ACE, going so far as to invent the concept of a return address stack. Functions are a powerful programming tool, and the syntax of many programming languages includes support for writing and using them. Judicious use of functions (for example, through the structured programming approach) will often substantially reduce the cost of developing and maintaining a large program, while increasing its quality and reliability. Functions, often collected into libraries, are an important mechanism for sharing and trading software. The discipline of object-oriented programming is based on objects and methods (which are functions attached to these objects or object classes). In the compiling method called threaded code, the executable program is basically a sequence of function calls.
- Is primary topic of
- Function (computer programming)
- Label
- enFunction (computer programming)
- Link from a Wikipage to an external page
- books.google.com/books%3Fid=_i6bDeoCQzsC&pg=PA39&dq=descriptive+function+name
- Link from a Wikipage to another Wikipage
- %22Hello, World!%22 program
- 360
- 360
- Ada (programming language)
- Adjective
- Alan M. Turing
- Alan Turing
- ALGOL
- ALGOL 58
- Algol 60
- Argument (computing)
- Assembly language
- Asynchronous procedure call
- Automatic Computing Engine
- BASIC
- Boolean-valued function
- Branch table
- Builtin function
- C (programming language)
- C++
- Calling convention
- Call site
- Call stack
- Category:Articles with example C code
- Category:Holism
- Category:Programming constructs
- Category:Source code
- Category:Subroutines
- CICS
- Circular reference
- Class (computer programming)
- Closure (computer science)
- Code optimization
- Code refactoring
- Code reuse
- Command–query separation
- Compiler
- Computational overhead
- Computer data storage
- Computer file
- Computer program
- Computer programming
- Coroutine
- C Sharp (programming language)
- Data descriptor
- Data structure
- Data type
- David Wheeler (British computer scientist)
- Decomposition (computer science)
- Determinant
- Dialect (computing)
- Divide and conquer algorithm
- Duplicate code
- Dynamic dispatch
- EDVAC
- ENIAC
- Evaluation strategy
- Event handler
- Exception (programming)
- Exception handling
- Execution (computing)
- Expression (programming)
- Fibonacci
- Forth (programming language)
- Fortran
- Function (mathematics)
- Functional programming
- Function prologue
- Garbage collection (computer science)
- General purpose register
- Global variable
- Haskell (programming language)
- Herman Goldstine
- High-level programming language
- Housekeeping (computing)
- HP 2100
- I
- IBM
- IBM 1130
- IBM 1620
- IBM PC
- Identifier
- Imperative programming
- Indirect branch
- Information hiding
- Inline expansion
- Instruction (computer science)
- Intel 4004
- Intel 8008
- Interrupt
- John Mauchly
- John McCarthy (computer scientist)
- John von Neumann
- Kathleen Antonelli
- Konrad Zuse
- Lazy evaluation
- Library (computer science)
- Library (computing)
- Lisp (programming language)
- Logarithm
- Logic programming
- Lotus 1-2-3
- Macro (computer science)
- Manchester Baby
- Mathematical functions
- Mathematical induction
- Matrix (mathematics)
- Maurice Wilkes
- Method (computer programming)
- Method (computing)
- Method overloading
- Microsoft Small Basic
- Modular programming
- Nested function
- Noun
- Object (computer science)
- Object-oriented programming
- Operator overloading
- Parameter (computer programming)
- Parameter (computer science)
- Pascal (programming language)
- PDP-1
- PDP-11
- PDP-8
- Peripheral device
- PIC microcontroller
- Procedural programming
- Processor register
- Programming language
- Protected procedure
- Pseudorandom number generator
- Punched card
- Punched tape
- Python (programming language)
- RCA 1802
- Recursion
- Recursion (computer science)
- Reduced instruction set computing
- Reentrant (subroutine)
- Return address (computing)
- Return code
- Return statement
- Return value
- Rice's theorem
- Scala (programming language)
- Scope (computer science)
- Scope (programming)
- Self-modifying code
- Side effect (computer science)
- Side-effect (computer science)
- Software maintenance
- Stack (data structure)
- Stack frame
- Stack overflow
- Stanley Gill
- Statement (computer science)
- Strong typing
- Structured programming
- Swift (programming language)
- Syntax (programming languages)
- Temporary variable
- Thread (computer science)
- Threaded code
- Traceability
- Transaction processing system
- Transclusion
- Umbrella term
- Undecidable problem
- UNIVAC I
- Variant type
- Verb
- Very long instruction word
- Virtual memory
- Visual Basic (classic)
- Visual Basic (classic)
- Z4 (computer)
- Reason
- enincreased relative to what?
- SameAs
- 4253859-2
- Alamprogramm
- Aliohjelma
- Altyordam
- Chương trình con
- Függvény (programozás)
- Funkcija (programiranje)
- Podprogram
- Podprogram
- Podprogram
- Podprogram
- Podrutina
- Potprogram
- pUau
- Punsiyon (agham pangkompyuter)
- Q190686
- Sota-programa
- Sous-programme
- Subprogramma
- Subprogramo
- Sub-rotina
- Subroutine
- Subrutin
- Subrutina
- Subrutina
- Subrutine
- Subrutine
- Sətiriçi altproqram
- Undirforrit
- Unterprogramm
- Utaratibu (uhandisi wa programu)
- Διαδικασία (υπολογιστές)
- Көмекші бағдарлама
- Подпрограма
- Подпрограмма
- Потпрограм
- Підпрограма
- שגרה (תכנות)
- تابع (علوم رایانه)
- دالة (برمجة)
- সাবরুটিন
- ซับรูทีน
- サブルーチン
- 子程序
- 함수 (컴퓨터 과학)
- SeeAlso
- Pure function
- Subject
- Category:Articles with example C code
- Category:Holism
- Category:Programming constructs
- Category:Source code
- Category:Subroutines
- WasDerivedFrom
- Function (computer programming)?oldid=1123825039&ns=0
- WikiPageLength
- 51896
- Wikipage page ID
- 32177451
- Wikipage revision ID
- 1123825039
- WikiPageUsesTemplate
- Template:!
- Template:Anchor
- Template:Authority control
- Template:Block quote
- Template:Citation needed
- Template:Clarify
- Template:Examples
- Template:Main
- Template:More citations needed
- Template:Other uses
- Template:Pb
- Template:Reflist
- Template:See also
- Template:Short description
- Template:Use dmy dates
- Template:Vague
- Template:Wiktionary