Writing Functions in classic ASP

In this post I’m going to show how to write functions in classic ASP with simple examples.

I know this is pretty old topic and this language is used very low comparing other technologies like PHP, Java, ASP.Net etc.,

But, there are websites still running in Classic ASP, this post may help you to understand the basic stuffs in Classic ASP.

Lets start writing a simple function in Classic ASP.

It is pretty much same like any other programming technologies, the above function accepts single parameter.

The output will be:
I like to eat Ice cream

Lets see another function which accepts multiple parameters,

Output:
Agurchand is living in India

If you compare the two examples, you can see a small difference, In the first example I have used parenthesis () when I called SingleParamFunc() but  in the second example I have excluded the parenthesis for MultiParamFunc(),  because in Classic ASP you cannot use parenthesis when passing two parameters for a function, so it is better if you do not use the parenthesis at all.

I hope you got an Idea of how the functions are working in Classic ASP. Enjoy learning!

Related Posts

Leave a Reply