Builder Lite
Description of Chapters

Part I: The Basics. This section teaches you how to program in the Builder Lite environment and how to write very simple scripts.

Chapter 1: Creating Builder Lite Programs. This chapter shows you how to utilize the Builder Lite programming environment. By the time you finish, you will be able to write very simple Builder Lite scripts.

Chapter 2: Anatomy Of A Builder Lite Program. This chapter shows you the basic format of a simple Builder Lite program and how to add internal documentation to your scripts.

Chapter 3: Starting With A Clean Slate. This chapter shows you how to have your program clear the screen and set the screen colors to any foreground and background colors you want.

Chapter 4: Communicating With The User. Builder Lite replaces the ECHO command with some very powerful tools for displaying information on the screen. This chapter shows you how to use those tools.

Chapter 5: Running Other Programs. One of the most important thinks a batch file or Builder Lite script does is run other programs. This chapter shows you how to do that with Builder Lite.

Chapter 6: Applying What You Have Learned So Far. Anytime you are learning new material, it's important that you periodically take the time to assess your progress. This chapter gives you some problems for you to address using the Builder Lite commands you have learned so far. If you get stumped, the answers are in the back of the book.

Part II: The Environment And Program Flow. So far, the scripts we have looked at had a linear flow. They started at the top and ran to the bottom. In addition, they did not use their environment or take information from the user. This section shows you how to interact with the user and how to have a script flow differently based on that interaction.

Chapter 7: Replaceable Parameters. This chapter shows you how a program can use information the user enters on the command line when starting the program.

Chapter 8: The Environment. The environment is a small block of memory set aside by COMMAND.COM to store common information such as the path, prompt and location of COMMAND.COM. Builder Lite's ability to work with the environment exceeds the abilities of batch files. This chapter shows how to use the environment in Builder Lite scripts.

Chapter 9: The Errorlevel. The errorlevel is a one byte piece of memory where programs can deposit a code indicating their status when they terminated. Builder Lite is well equipped to work with the errorlevel and this chapter explains how.

Chapter 10: Introduction to Logic Testing. The If-test is an extremely powerful tool for having a script follow different paths depending on the conditions that exist when the program is run. This chapter shows how to use powerful If-test that is available in Builder Lite.

Chapter 11: Batch Style Looping And Program Flow. Builder Lite offers advanced looping capabilities which are discussed in Chapter 18. However, it also fully supports DOS batch file style looping in order to be fully compatible with existing batch files. However, the implementation in Builder Lite is slightly different. This chapter discusses using Goto and For loops in a Builder Lite script.

Chapter 12: Applying What You Have Learned So Far. By now, you have covered enough of the Builder Lite material that you can write any batch file in Builder Lite. Beginning with Chapter 13, the commands we will be learning have no ready counterpoint in a DOS batch file so it's important that you have a firm foundation. So, once again we stop and take a moment to test that knowledge. If you get stumped, the answers are in the back of the book.

Part III: Advanced Builder Lite Commands. So far, most of the Builder Lite commands have some sort of general DOS counterpoint. So, up until now, Builder Lite has not been much more than a fancy replacement for DOS batch files. That is about to change! From here on out, most of the Builder Lite commands do not have DOS equivalents. That is, they add entirely new functions and capabilities to the DOS batch language. So, hold on to your seats...

Chapter 13: Working With Variables. Builder Lite can place information into a place holder-called a variable-and then access that same information later. For example, a script might ask the user her name and then later use that information to include the user's name in a menu title. This chapter shows you how to work with variables.

Chapter 14: Advanced Logic Testing. The logic testing that is built into DOS is fairly limited. While DOS has only limited logic testing abilities, Builder Lite suffers from no such limitation. This chapter shows you how to use all the logic testing features built into Builder Lite.

Chapter 15: Getting Input From The User. DOS is very limited in its ability to get input from the user. A batch file can test on replaceable parameters and Pause and tell the user to press Ctrl-Break to abort and nothing else. Builder Lite has no such limitation. It can query the user for a single character response or a multi-character response. This chapter shows how.

Chapter 16: Menus. Builder Lite has commands to display three different types of menus on the screen. Not only that, Builder Lite takes care of all the mechanics of letting the user make a selection and then executing the user's selections. This chapter shows how to use these very powerful commands.

Chapter 17: Applying What You Have Learned So Far. We have covered a lot of powerful and complex commands that have no DOS counterpoints. More powerful commands are to come so its important that you understand the commands already covered. So, once again we stop and take a moment to test that knowledge. If you get stumped, the answers are in the back of the book.

Part IV: More Advanced Builder Lite Commands. In Part III, you began to see the powerful "extra" commands that Builder Lite gives you-commands that have no batch file equivalent. If you used only the commands through Part III, you would be able to build very powerful scripts.

Chapter 18: Advanced Looping. While DOS batch files offer only simple For- and Goto-loops, Builder Lite offers much more advanced loops. These loops are useful when you need to continue prompting the user for information-like a password or subdirectory-until the correct information is received; when you need to repeat commands for a specific number of times; or when you need to repeat commands until a specific condition is met.

Chapter 19: Subroutines. Subroutines allow you to create what are essentially new Builder Lite commands that do what you want them to do. If you script needs to perform the same task more than once, you can code that task once as a subroutine and then call it from the main program every time it is required. That way, you only have to write and debug the code once and you only have to make modification in one spot when changes are needed.

Subroutines come in two varieties, internal and external. With an internal subroutine, the code is stored in the same file as the main program and the new Builder Lite command is only available to that script. With an external subroutine, the code is stored in a separate file and can be made available to any script. Writing, debugging and managing external subroutines is much more difficult.

Chapter 20: System Variables. Builder Lite has predefined system variables that can found out almost anything about a computer and its environment. This chapter shows you how to use these system variables.

Chapter 21: Configuring Your Scripts. For the most part, I've found the default setting for Builder Lite to be acceptable. However, if there is something about the Builder Lite environment you don't like, chances are you can change it. This chapter shows you how.

Chapter 22: Miscellaneous. Builder Lite has a few commands that did not fit neatly into one of the other chapters. This chapter covers those commands.

Chapter 23: Final Exam. Finally, we have covered all the Builder Lite commands. As you can see, Builder Lite is a very powerful language. Before moving on to the reference material, let's stop and make one final check of your Builder Lite knowledge. As always, if you get stumped, the answers are in the back of the book.

Part V: Reference. When you reach this point, you will have reached the end of the new material. The remaining material is reference material.

Chapter 24: Program Documentation. In addition to the Builder Lite program, the disk that comes with this book has copies of most of the scripts discussed in the book plus a few extra examples that are not otherwise discussed in the book. This chapter documents all the .BLD files that come on the disk.

Chapter 25: Builder Lite Encyclopedia. This chapter lists each Builder Lite command alphabetically. For each command, it shows its syntax and briefly describes its usage. Use this chapter when you need quick information about a command.

Chapter 26: Converting Existing Batch Files. This chapter shows you how to jump-start your script writing by converting your existing batch files.

Appendix A: Problem Solutions. The book presents ten different programming problems to test your Builder Lite knowledge at various points in the book. This appendix shows my solutions to those ten problems.

Appendix B: Builder Lite Error Messages. This appendix documents the error messages you might see while running Builder Lite.

Appendix C: Builder Lite Reserve Words. There are a number of words you can not use as variables or subroutine names. This appendix lists those names.

Appendix D: Keystroke Constants. Several Builder Lite commands deal with keystrokes. That is easier when you use the Builder Lite keystroke constants rather than the ASCII values. This appendix lists those constants.


Important Notice

The information for this book was taken from the last draft I submitted to the publisher. Since the publisher performed minor editing, the version you purchase in the store will be slightly different.


Order This Book On-Line

Order One Of These Books. Amazon.com is an on-line bookstore with a very large list of books, including all of mine that are still in print. This link will take you to Amazon.com using a special page they set up to showcase all my books. They are the easiest way I know of to order my books on-line. Of course, you can use this page to order any of the books they carry.

 

 

© 2002 by Ronny Richardson, All Rights Reserved