User-Defined Function

Why Trust Techopedia

What Does User-Defined Function Mean?

A user-defined function (UDF) is a common fixture in programming languages, and the main tool of programmers for creating applications with reusable code. Since programs are mostly composed of code that comes from the programmer, or in this case the user, most of it is composed of user-defined functions occasionally punctuated by built-in functions.

Advertisements

Techopedia Explains User-Defined Function

User-defined functions allow programmers to create their own routines and procedures that the computer can follow; it is the basic building block of any program and also very important for modularity and code reuse since a programmer could create a user-defined function which does a specific process and simply call it every time it is needed. Their syntax depend entirely on the programming language or application where they are created.

Though part of any programming language, user-defined functions more commonly refer to the special functions that a user creates as scripts or programs in large systems such as databases or spreadsheets like Microsoft Excel. This is because most of the functions being used in a database system or spreadsheet are built-in functions that the user simply has to call and provide parameters, and most of what the application can do is already being done by one or more built-in functions. In this case, user-defined functions are special custom functions that are meant to do something not normally done by the built-in functions. In programming languages such as C, C++ and Java almost every part of the program is user-defined, hence, these functions are no longer referred to as “user-defined” to separate them from the built-in functions, they are simply called functions.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.