To download sample chapter (in Impression format). To Book introductory page.
Objective - Assumptions - Book sequence -Printing conventions.
What a computer program is - The nature of Basic instructions, program lines and line numbering
- Getting the computer ready for Basic - Command Line and Task Window - Basic Immediate
Mode - Amending, listing and saving programs from command line/Task Window - Using !Edit
for programming.
Definition of project aims - Outline planning of program.
What are variables - Demonstration of use in initial Loan program - Declaring variables and
assigning values to them - The three variable types: integer number, real number and string - Null
strings - Using them in programs - Incrementing numeric values - Variable names.
The verbs of Basic sentences - Getting a list of keywords and their syntax from computer -
Keywords and variable names - Keywords LET, REM, PRINT and TAB( introduced and
demonstrated in detail - Print modifiers - Parameters and arguments - Keyword ERROR
introduced - Use of ON ERROR in simple error traps - Common error messages.
What they are - Two main uses - DEF PROC/FN described with examples - Where DEFs are
placed in program listings - Calling PROC/FNs demonstrated - PROC/FN names - Formal
parameters and passing parameters demonstrated - PROC/FN as structural aids - Empty PROCs -
Upgrading Loan program with PROC structure - Initial brief introduction to Screen modes,
colours, menu formatting and pausing a program - First use of upgrade listing for Loan program.
User selection from screen menu - Control loops introduced - REPEAT ... UNTIL and WHILE ...
ENDWHILE loops explained in detail and compared - Exit and entry conditions - First use of
TRUE/FALSE - Nested loops - Keywords INSTR(, CHR$, ASC, GET and GET$ introduced and
incorporated into Loan program - Forcing a valid keypress - Masking to upper/lower case -
INKEY and INKEY$ briefly introduced as alternative to GET/GET$.
User entry of values with keyword INPUT - INPUT introduced in detail - IF ... THEN ... ELSE ...
ENDIF construction introduced in detail (with and without use of ENDIF) - Incorporated into
Loan program update - Input validation, with first example used in Loan program.
CASE ... OF ... WHEN ... OTHERWISE ... ENDCASE construction introduced in detail with
several examples - Incorporated into Loan program upgrade.
FOR ... TO ... NEXT ... STEP construction introduced in detail and incorporated into Loan
program upgrade.
Keyword STR$ - Adding strings - Keywords LEFT$(, RIGHT$(, MID$( and LEN introduced
and demonstrated - Keyword STRING$( - Loan program upgraded.
Operator priority - Use of brackets to control calculation order - DIV and MOD - Most popular
built-in math/trig functions - Use of RND.
Graphics play area - OS units - standard non-Wimp screen - Pixels - Screen resolution -
Preparing screen for graphics plotting - Keywords MOVE, DRAW and BY introduced and
demonstrated - Effect of screen resolution on pixel/dot size - RECTANGLE, CIRCLE, ELLIPSE
and FILL demonstrated - POINT - Graphics grid.
Keyword PLOT introduced - Plot code block/offset principle, with examples - Introduce graphics
to Loan program - graph drawing.
Separate text and grapics viewports - Use of VDU 5 for text in graphic viewport - Detailed
comparison of VDU 4 and VDU 5 text operations with demonstration - Defining text/graphics
viewports with VDU 24 and VDU 28 - Incorporation into Loan program upgrade - Solving
calculations by successive approximation - More graph plotting.
Multiple graph plotting/scaling - PROC structure and input validation revisited - ratcheting
values - Revisiting PROC/FN to introduce local/global variables - Keyword LOCAL - Importance
of free-standing PROC/FNs - Repeating a program Final version of Loan program - Suggested
areas for its further development.
Detailed introduction of VDU commands, concentrating on VDU control codes - Keyboard
Permanent and temporary storage - Use of READ, DATA and RESTORE - Data pointer.
Using DIM to create arrays - Single and multi-dimensions - Subscripts - Comparison with
variables - Demonstration using same data as previous chapter for comparison - Reason for
declaring arrays early in program - Scope of operations on whole arrays.
Basic data files in detail - OPENOUT, OPENUP and OPENIN explained - Lost files - Keywords
CLOSE#, PRINT# and INPUT# - Data file pointer - Common error messages - Trapping open
files in error trap - Pointer manipulation - Data file structure - Keywords PTR#, EXT# and EOF# -
File dumps - Format of stored data items demonstrated - Basic V/VI differences - Data type
identifiers - keeping track of pointer.
DIM revisited - Reserving blocks of memory - Indirection operators - Entering and retrieving
data.
Non-Wimp colour - Number of colours available - Colour numbers - Default palettes in 2-, 4- and
16-colour modes - Changing palettes in these modes - Keywords COLOUR, GCOL, CLS and
CLG - Demostration of colour control/choices - 256-colour modes and TINT - Brief introduction
of GCOL with two parameters - AND, OR, EOR and NOT with colours - Demonstration -
Keyword POINT( - TINT revisited.
Importance of libraries to Wimp programming - Keywords LIBRARY, INSTALL and
OVERLAY introduced and compared - Building a library, with example.
Access to Operating System - Keyword SYS - Detailed examination of SYS call structure - SWIs
- Use of commas to avoid ambiguity of input/output parameters - Parameter blocks.
Wimp and non-Wimp compared - The Wimp - Interaction between application program and
Wimp - Wimp Poll - Reason codes - Structure of Wimp program - Example of possible Window
for Wimp version of Loan program - Wimp programming tools.
Appendix 1. Current Directory
Appendix 2. Variable names
Appendix 3. TRUE and FALSE
Appendix 4. Table of ASCII codes
Appendix 5. Hex and Binary numbers
Appendix 6. The operators AND, OR, EOR, NOT,
<<, >>, and >>>
Appendix 7. Declaring string variables
Appendix 8. Memory and the storage of numbers
Appendix 9. VDU control codes
Appendix 10. Operations on whole arrays
Appendix 11. Supplementary notes on Tutorial
program formulae
Index
-- 40 screen shots/diagrams
-- Listings
-- Disc of listings (includes original Drawfile graphics)
All excess of income over costs will go to charity.
17. Data storage/retrieval (READ, DATA and RESTORE)
18. Data storage/retrieval (Arrays and the keyword DIM)
19. Data storage/retrieval (Data files)
20. Data storage/retrieval (Direct memory access/indirection)
21. Colour
22. Libraries
23. Using the Operating System (SYS calls)
24. The nature of Wimp programming
-- 336 pages (178 double-sided sheets) in A5 format, ring-bound
Price, including UK post and packing, is £16-00 (book-plus-disc). (Only cash or sterling cheques can be accepted.)
If you want a copy of the book please contact me by Email in the first instance at:
(Sorry about this 'non-live' address. It's an attempt to reduce spam.)
To download sample chapter (in Impression format). To Book introductory page. To Welcome page.