Archive

Posts Tagged ‘User-Defined Functions’

Using Optional Argument with User Defined Functions in PHP

March 11th, 2010 Mehmatrix No comments

Hi everybody. After a long time, I am here again with my new articles. I thought it can be good to start with a little clue for PHP coders.

Usage of PHP functions is so easy and practical. However, usually we need to write our own functions while we are making our applications.

1.1) User Defined Functions in PHP

Structure 1.0:

1
2
3
4
5
6
7
<?php
function FunctionName( arguments ){

//php codes

}
?>

The function ends when return() statement is executed. Click to Read Complete Article »

Bookmark and Share

Making User-Defined Functions in ASP

October 12th, 2009 Mehmatrix No comments

Functions are generally used to perform same operations, or compute equations. For example, suppose that you need to get an average of some numbers. What do you have to do? Are you going to write the equations all the time? A good programmer has to find the shortest way to do works. So, if we always need to get average of numbers, we write a function that evaluates average of numbers instead of writing equations for each operation. That’s why, we need functions, and that’s why you have to know how to use functions.

A function works in two different ways. It can return a value or it can do just operations. If the function makes only operations, doesn’t return a value then it is called void function, else it is called avoid function.

We use function procedure to create functions in ASP.

1.1 ) Making Avoid Functions in ASP

Structure 1.0: Structure of an avoid function in ASP

1
2
3
4
5
6
7
8
9
< %
function FunctionName( arguments )

'…
'Operations
'…
FunctionName=value
end function
%>

Click to Read Complete Article »

Bookmark and Share
eXTReMe Tracker