BASIC is the language that is first learnt by most people who take up computer programming. However, the BASIC language comes in many different forms and has evolved over the years from a simple beginner's language to a sophisticated professional tool. Modern versions of BASIC are even more simple to use than their forerunners; yet they now contain a variety of complex programming structures, providing virtually everything the professional programmer could ask for. Amongst the several BASIC versions currently available, MIcrosoft's QuickBASIC 4.5 is probably the most the most widely used and certainly the most effecient. It can be used be used to write all types of program and its flexibility gives it an edge over other, more specialized languages in a wide range of programming situations. This book takes the user from the initial installation through the stages of program design and structure, the command language and its use, operation and program debugging. By the end of the book the reader should be proficient in the operation of the QuickBASIC programming language and able to construct sophisticated programs.
The emphasis is on showing how to build effective programs through the use of meaningful exapmles. Coverage includes QuickBASIC more advanced features as well as the standard BASIC facilities. The book has a single, main theme: the creation of a program to record, cross-reference and display local history data. This example has been chosen because it incorporates most of the principles neede for a whole range of programming situations. While the finished product may be of little use to the majority of programmers, the program has been designed on a modular basis. Each module is typical of the activities required in thousands of otherr applications: selecting from menus, text-file handling, record-based data, manipulating dates and other data types, simple graphics, and so on. Therefore there are many sections of the sample program that cen be adapted and re-used many times over. Although this book is based on QuickBASIC 4.5, most of the information also applied to earlier versions of the package (and, indeed, to other versions of BASIC). The text clearly identifies those areas that are specific to Version 4.5.
Table of Contents:
Part 1 Initial preperations: installing the program; running QuickBASIC; editing facilities; QuickBASIC menus; program design; detailed design. Part 2 Simple programs: printing to the screen; running a program; position and colour; variables; displaying and inputing variables; FOR loops; the ASCII character set; boxes and windows; DATA statements; arrays; input options; WHILE...WEND loops; more advanced loops; conditional statements; nested IF statements; routines; advanced procedures; the ON...GOSUB option; SELECTing by CASE; using functions; using-defined functions. Part 3 String handling: string slicing; combining strings; working with dates; switching strind types; other string functions; responding to the cursor keys; the text editor. Part 4 Working with files: file types and names; creating sequential files; reading sequential files; text files; creating random access files; rading random access files; using index files. Part 5 Error handling: finding errors; the Debug options; advanced use of Debug; error trapping. Part 6 Graphics and sound: graphics modes; lines and boxes; circles and other shapes; colour and patterns; text in graphics modes; using pixel blocks; saving pixel blocks; using the mouse; developing a routine; advanced graphics operations; sound. Appendices: QuickBASIC commands; QuickBASIC functions; additional routines.