The word paradigm is described as “a typical example or pattern of something; a pattern or model”. Therefore, programming paradigms can be described as set of guidelines or rules outlining how things should be done within a programming language. One such paradigm within programming languages is built-in functions. Built in functions can be used to easily manipulate and process data in line with program requirements without having to write complex code of your own to perform the same task.
In programming paradigms for built-in functions, many arithmetic functions are common across a number of programming languages. Functions such as Truncate, Random, Round and Range enable programmers to easily manipulate numeric data. Random functions can generate random numbers in specific numeric data types. Rounding functions can be used to round up or round down numeric data to set amount of decimal places. Built-in truncate functions can be used to trim data from a number field at a specific point.
String handling functions are used to manipulate strings in computer programs. Examples are length, position, concatenate or convert to type. The length function can be used to determine the length of a string value and will return the length of the string as an integer. Position functions can be used to determine where a specific character value is placed within the string. The position function will return the value of where it finds the character in the first instance. Concatenation functions can be used to join strings together, an example of where this could be used is if a user entered their forename and surname into two separate fields, the data could be joined to create the user’s full name. String conversion functions can be used to convert number values to string such as integer to string conversion. This may be needed if specific information within a number needed to be extracted or provided as characters only. Similarly a string can be converted to a number value if calculations had to be done on it.
General functions are available across programming languages and paradigms define a number of common functions available to a wide range of programming languages. Input functions can be used to accept data entries such as keyboard, mouse, touch screen, sensor or switch. In the simplest form an Input function could wait until the user click a button before the program proceeds. Other general functions in programming allow programmers to deal with files, these are Open, Read, Write and Close. These are pretty common across all programming languages and can be useful when testing programs that deal with data. Print functions are used to print to screen in the simplest for and again are handy for displaying data simply during the development phase.
As with other rules and conventions outlined by programming paradigms, built-in functions and the format of these is very similar for most programming languages. They use similar identifiers and structures and understanding how a built in function is used in a different language is as simple as using the help for the syntax for the new language that you use. Having an awareness of programming paradigms and the types of functions that they provide is an essential skill in a programmers toolkit in terms of getting things done fast and efficiently.