What is a computer function?


Quick Answer

A computer function is a group of instructions meant to carry out a particular task for the primary routine, and requires direction to the point of origin upon accomplishing the task. In computer programming, the term refers to a subset of a program that performs an identified task.

Continue Reading

Full Answer

Functions are self-contained sets of code that perform specific functions. The term "function" is often used interchangeably with operation and command. It is a procedure that results in a specific service. For instance, to erase a word, a programmer executes the delete function. In general terms, a function is what happens leading to a particular entity. Functions generally “take in” data, process it and "return" an output.

Once written, a function can be used multiple times. Functions can be executed from the inside of other functions as well. Functions play an important role by combining numerous instructions into one line of code. They allow users to view a program as a series of sub-steps, and enable users to break down a seemingly complicated program.

Functions help organize programs into bunches that correspond to how people think about solutions to problems. Functions are also applied in mathematics to show a relationship between the independent and dependent variable.

Learn more about Computers & Hardware

Related Questions