Table of Contents
BBC BASIC Language
BASIC programs
Debugging
Error handling
Number manipulation
String manipulation
Variables, arrays, structures, data types
BBC BASIC Language
(Articles about the editor and compiler have been moved to
Program Editor and IDE
)
BASIC programs
Alternative comment styles
Alternative FOR NEXT behaviour
Detokenising tokenised code
Discovering how a program was run
Finding the BBC BASIC installation directory
Finding saved BASIC file format
Finding the version number
Fitting programs in the demo version
How to avoid GOTOs
Notes for RISC OS users
Object Orientated programming
Running a BAS file from the command line
Simulating CONTINUE
Simulating RESUME and RESUME NEXT
Using the tokeniser
Debugging
Memory usage monitor
Getting the current line number
Listing the line an error occurs in ON ERROR
Pausing under program control
Error handling
Cascaded error handling
Cascaded ON CLOSE handling
Displaying program errors in a message box
Simulating RESUME and RESUME NEXT
Structured Exception Handling
Verbose error messages
Number manipulation
Converting Binary Coded Decimal
Finding the parity of a number
Handling unsigned 32-bit values
High Quality Random Number Generation
Hyperbolic functions
Modulo integer arithmetic
Non-integer modulo operation
Notes on the use of RND
Number conversion in BASIC
Rounding functions
Saturation arithmetic
Short-circuit evaluation
Simplifying arithmetic using strings
The ATAN2 function
Using 16-bit floating point values
Using 32-bit floating point values
String manipulation
Changing the case of a string
Counting the characters in a Unicode string
Data without DATA
Reversing a string
Sorting the characters in a string
Substituting characters in a string
Using regular expressions
Variables, arrays, structures, data types
Aligning structures
Allocating arrays using the Windows API
Allocating and freeing memory blocks
Avoiding resource leaks
Clearing the contents of a structure
Creating an array alias
Deconstructing arrays
Emulating the C assignment function
Fast variables
Finding the SUM or MOD of a partial array
Finding the size of an array in a structure
Forcing a variable to exist
Handling unsigned 32-bit values
Interpreter internal variables
Lambdas (anonymous functions)
Memory usage monitor
Passing array and structure parameters
Passing substructures to procedures
Pseudo-variable side effects
Re-dimensioning arrays
Reading and writing arrays in files
Returning an array from a function
Searching ordered lists
Sharing PRIVATE variables
Simulating a union
Sorting the characters in a string
Sub-structure arrays
Using 16-bit floating point values
Using 32-bit floating point values
Variable-length array in a structure
Whole-array operations in structures
Writing to VDU variables