Chapter 3. The Components of a Script
IN THIS CHAPTER
Every good book has a structure. This book, for example, includes an introduction and some introductory chapters. Most of the book is taken up with explanatory chapters and examples. There’s an appendix, an index, and a table of contents. These elements work together to make the book useful for a variety of purposes, including learning, referencing, and so forth.
Scripts have a structure, too. The main body of the script is a bit like its table of contents, organizing what the script will do. Functions and subroutines are the chapters of the book and perform the actual work. Finally, the comments and documentation ...