Functions in programming

It is possible to separate commonly used code in a program into a separate function. It is easier to debug code with functions. If a problem exit within a function, then only code of that function needs to be fixed all other code may stay impact, I say may, because I assume that there are no more code issues. A function needs to have an input and a result.

An example of a function is a sum of two numbers. In this case two numbers will be provided to a function, and result of it will be addition of these numbers.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator