Aimed at all scientists and engineering professionals who need to learn programming quickly and easily, this book teaches computer programming from the ground up with Microsoft QuickBASIC, a modern, fast and easy-to-learn programming language. Examples used throughout the book are useful for students and professionals in chemistry, physics and engineering. The book covers the basics and then proceeds to more sophisticated programs using a disk enclosed with the book, containing pre-tested procedures for important operations such as graphing (screen printer, plotters); data entry/edit/save/retrieve; file management; linear regression; cubic spline interpolation; Romberg integration; differential equations; and Fourier transform. These routines give many of the advantages of a spreadsheet, but with a simpler and more powerful programming language. This book shows the reader what these routines do and how to use them effectively. The accompanying disk runs on any IBM or compatible microcomputer with a graphics board, 640K RAM, DOS 3.0 or higher, and a copy of Microsoft QuickBASIC (verion 4.0 or higher).
Table of Contents:
INTRODUCTION. The QB Editor. How Computers Store Information. BASIC Variables. Variable Names and Types. BASIC Operators. Input/Output of Data. BASIC FUNCTIONS. Numeric Functions. String Functions. User-Defined Functions. BASIC PROGRAMS. About Programs. Program Bugs. Sums and Factorials: FOR...NEXT. Conditional Statements: Logical Variables. Fibonacci Numbers: DO...LOOP. Applications. Recursive Functions: Hermite Polynomial. ARRAYS AND SUBROUTINES. Arrays. Subroutines. Maximum and Minimum of Array. Scope of Variables. Sorting. Array Mean and Standard Deviation. Least Squares Straight Line. Array Differentiation and Integration. The GOSUB Alternative: Line Numbers. STRUCTURED PROGRAMMING. SELECT CASE. Program Roots. Planning Ahead. Program Design. MODULES. Program Structure. Scope of Variable. Transferring Code between Programs. The GENSUBS Module. Where Are My Modules? Modification of Modules. List Editing. ERROR HANDLING. GRAPHS. Graphics Commands. Applications. Color on Graphic Screens. The SCRPLOT Module. Graphing Functions. Applications. DATA I/O. Disk Files. Printing on a Printer. File Manager Module. The DATAIO Module. All of the Above. CURVE FITTING: REGRESSION. Linear Regression. Test Program. Nonlinear Regression. Test Program. Designing a Structured Program. INTERPOLATION. Lagrange Interpolation. Cubic Spline Interpolation. B-Splines. INTEGRATION. The Richardson Extrapolation. Romberg Integration. Program ROMBERG. Applications. DIFFERENTIAL EQUATIONS. Euler Method. Runge-Kutta. Chemical Kinetics. Second-Order Differential Equations. Other Applications. MATRIX ALGEBRA. Basic Operations. Simultaneous Linear Equations: Matrix Inversion. FOURIER TRANSFORM. FT Nuclear Magnetic Resonance. The Logistic Equation. FT Filters. DATA BASE PROGRAMMING. Data Types. Random-Access Disk Files. Changing the Data Structure. COMPLEX NUMBERS. COMPILED PROGRAMS AND LIBRARIES. Compiling and Linking. Libraries. Alternatives. Foreign Languages. MORE ABOUT QUICKBASIC. Variable Storage. Fixed Length Strings. $INCLUDE Files. DOS Functions from BASIC. TRANSLATING FORTRAN TO BASIC. Relational Operators. Iteration. Numerical Operators. Procedures and Arrays. Other Differences. Translation with a Text Editor. PRINTING GRAPHICS. Output to Device. HPGL and HPLOT Commands. Sample Program. Setting Plotter Defaults. APPENDIX: LIST OF PROCEDURES AND FILES. GENSUBS.BAS Module. SCRPLOT.BAS Module. DATAIO.BAS Module. FILMANAG.BAS Module. REGRESS.BAS Module. SPLINE.BAS Module. QMATH.BAS Module. HPLOT.BAS Module. Other Software.