• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Scripting Basics > Functions and Subs and void, OH MY!

Functions and Subs and void, OH MY!

So far in this chapter and in this book you’ve been dealing with code blocks that are self-contained, or in other words, that do all the work within themselves. What if I told you there was another way in certain instances to write less code, reuse code, save loads of time when you’re debugging, and separate out your code into compartmentalized blocks that are easier to use and to read? Would that be exciting? Okay, you’re not gonna jump out of your chair and do cartwheels, but it is a little exciting, isn’t it?

Functions and subs, enter stage right. Functions provide a great way to achieve all the above-mentioned benefits and probably many more I can’t think of. They give us a way to use blocks of code over and over from anywhere in pages or even whole applications.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint