Internet
Fact-checked

At WiseGEEK, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

# What Are Array Functions?

A. Leverkuhn
A. Leverkuhn

An array function is commonly defined as a function that works with an array. The array is a common concept in computer programming, where various variables are classed together with a common name. Variables are individual items that contain numbers, letters or other data. In an array, each individual part of the structure may be named by a separate coded number or other identifier. Computer programmers use arrays to construct groups of variables that can be worked on by a program in an identical way. It’s also a means to organize variables logically within a program.

Generally, developers define array functions as functions that uses an array for various purposes. A specific definition of an array function is a function that operates on an array, and which returns a specific kind of variables. Some refer to an array valued function as a function that returns an array.

Array functions, as they are understood in the more general sense, can be used for many different purposes. Developers might create a function that manipulates each variable in an array in a specific sequence. A programmer could say that this function returns an altered array, where each of the variables has been changed, or not changed, according to specific criteria established in the code of the function.

Some array functions are more observational. For example, a computer program might call a function that leads the program to print out the current contents of each variable in an array. In this case, none of the contents of the array will be changed by the function. These types of functions can be valuable in presenting information about current states or conditions of variables to a user.

One thing that is extremely important with array functions, and other parts of code, is the exact syntax that is used to create the function. Even the slightest mistake can cause problems with functional code modules that target an array. For example, it’s important to know whether the specific length of the array, or number of included variables, is necessary within the function in order to make it perform correctly. Programmers look very carefully at the uses of an array to make sure they work in a particular computer programming language.