Strefa czasowa: UTC + 1

Teraz jest 2020-07-06 19:14:19
Łączny czas online:

Utwórz nowy wątek Odpowiedz w wątku  [ Posty: 1 ] 
Autor Wiadomość
 Tytuł: Kasper Schmeichel Jersey
PostNapisane: 2020-01-06 11:41:03 

Dołączył(a): 2018-02-23 04:49:26
Posty: 131
Płeć: Nieokreślona
Functions and Subroutines in ASP
If you read our Tutorial on Include Files (SSI) then you learned how to encapsulate ASP code within include files and the benefits it brings us.

As developers Nampalys Mendy Jersey , we should endeavour to make our lives easier wherever possible... no one wants to re-invent the wheel after all.

Functions and Subroutines exist to not only save us time, but to bring power to our ASP.

They are just another way of encapsulating code, but have a lot more functionality than just 'saving some code for later'.

First, let's look at Functions... Imagine a balloon salesman in the street. We've all seen them they require one piece of information when you buy a balloon Matty James Jersey , the colour.
Let say we asked for a red balloon... The balloon salesman armed with this 'information' then does a pretty basic action... he hands you the balloon. The balloon you received is a direct result of the information you gave the balloon seller.

Functions are just the same... they return to you a value based on the information you provided. Lets look at an example Function: -

A Function is passed some information. The information we pass a Function, is known as an 'argument'. The information we get back from a Function is known as the 'return value'. Whilst a Function can have many arguments, it can only have one return value.

Let us look at one more example: -

Again, another basic example. We should notice this time that the Function accepts two arguments.

By now, we have some idea of how to write a Function. How do we use one?
Let me show you now how we can use the calcTax example.

Above you see the example function in action... easy huh!

I have tried to make understanding Functions as easy as possible... Understanding a Subroutine (Sub) is now going to be easy for you. Imagine a block of code that performed some instructions based on information you gave it...
Sounds very much like a function, doesn't it? Well this time, we do not get anything back. A sub does NOT pass back information it just uses the data we give it for some purpose.

I will use only one example of a Sub, and in the same example make use of the sub: -

The above Sub Leonardo Ulloa Jersey , demonstrates my point. We put something in, it performs an action (in this case writing to the screen), but nothing is returned to us in the code. One thing that REALLY IS important when using a sub, is that we do not put brackets around the arguments... Because we do not have a return value we do not need brackets and in this case Kasper Schmeichel Jersey , if we try we will get an error.

Well, that just about concludes this article. We should by now be writing efficient code with the use of Functions and Subs. Don't forget that if you use your functions and subs in multiple pages then you should really store them within include files for reasons of easy maintenance and better performance.

College term papers writing could be very arduous for some students. There are a couple of reasons apart from the difficulty of these academic challenges. Firstly, if you are attempting writing for these papers for the very first time, be sure that you don't put off its writing. It will come out to be much easier if you just do not procrastinate. All the responsible students know importance of undertaking their college assessment papers. For that matter the papers we are talking about are mandatory for passing out college respectfully. So you know the worth of every single assignment that you get to write and work on them accordingly.

Waiting until the eleventh hour for start preparing for your paper is no way deemed as a sensible act. You must have heard Jeff Schlupp Jersey , not to scoot forward today's work on tomorrow. The time up in your sleeve provides you quality time to work on ideas and cross a couple if they don't work. Of course why every elder and experienced person says to start working on any of your task when you get to know that you have to. Term papers are known as the most dreaded papers in college because they require a thorough research for their accomplishment. This is also the most time-consuming part and must be given quality time.

When you begin working on your papers as soon as you seem possible, you will experience that the stress level you are feeling is lesser. You will be working feeling relaxed that will eventually the result couple of folds better. Most of the time when pupil fails in their college assessment papers because they start on their working at the very eleventh hour. This particular act elevates their stress level and ultimately worsens their papers' result. For risking one of your most important papers in college you are required to get to preparing as soon as it's feasible for you.

 Zobacz profil  
Wyświetl posty nie starsze niż:  Sortuj wg  
Utwórz nowy wątek Odpowiedz w wątku  [ Posty: 1 ] 

Kto przegląda forum

Użytkownicy przeglądający ten dział: Brak zidentyfikowanych użytkowników i 7 gości

Nie możesz rozpoczynać nowych wątków
Nie możesz odpowiadać w wątkach
Nie możesz edytować swoich postów
Nie możesz usuwać swoich postów
Nie możesz dodawać załączników

Skocz do:  
Style created by © Matti, gry komputerowe, reklama sem reklama seo

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group Change colors.
Przyjazne użytkownikom polskie wsparcie phpBB3 - phpBB3.PL
[ Time : 0.034s | 15 Queries | GZIP : Off ]

Sponsorem naszego serwera FTP jest e-utp.net