Typing In Listings Feature

Further explanations of Jim Notman's formatter - with Mode 7 firmly in mind.

Volume 2

Number 3

May 1984

Use JIM NOTMAN'S function key command strip ...

Take the toil out of typing in your programs

THE INCORRECT use of spaces can create problems when typing in programs. BBC Basic, with its long variable names, is much more particular about where spaces occur than simpler Basics.

The computer must be able to determine where the variable name ends and a keyword begins.

In general, if a variable name does not have a "delimiting" character such as $ % = >< +/*-,; or : after it, there should be a space. Otherwise "No such variable" error may result.

Spaces are not required after keywords, though (if the syntax allows) it does make the listing more readable.

For easier readability, many of the listings printed in The Micro User use our special formatter. When inputting these listings, do not press RETURN until all the statements from that line number have been typed in. For example:

100 IF letter <> line end
THEN PRINT "continue typing"
ELSE PRINT 'Press Return" (RETURN)
110 NEXT program_line (RETURN)

In some of the listings you will see some numbers enclosed in brackets and underlined after PRINT statements, such as:

PRINT "<129>Red"

In this case the line includes the teletext control character 129 which makes the rest of the screen line red. These codes can be input directly from the keyboard (NOT with OS 0.1) by using the function keys with combinations of the SHIFT and CTRL keys.

If any program which uses the function keys has been run, say Wordwise, it is best to reset the BBC with CTRL BREAK.

Before the function key command strip on the edge of the page can be used type in:

*FX227,140
*FX228,150

This allows all the important control codes to be generated and the function keys can still be programmed with strings as usual.

Before typing a program try:

REPEAT : PRINT GET : UNTIL 0

with the function keys, to see that you are really producing the expected codes.

When using codes 150 to 159 by holding down the CTRL and SHIFT keys and pressing a function key, line scrolling will be prevented until the SHIFT and CTRL keys are released.

It is sometimes a little confusing using the double height character 141 (&8D). Try:

AUTO (RETURN)
10 PRINT "<141>Hello" <RETURN>

When the cursor reappears the next line number is no longer visible as expected. If you now use the cursor to move up to line 10 and copy the line with the COPY key, you'll notice that PRINT cannot be seen on line 20, but that when Hello is reached you'll see the double height Hello.

This rather strange effect is due to the way the teletext character generator works.