AUTO

Syntax

AUTO [start_number][,step]

Location

QL ROM

This command automatically creates line numbers in the command line (#0) to assist in entering SuperBASIC programs. It would normally only be entered as a direct command (although you can include it in a program line, the line numbers will not be generated until the program has finished its work).

Once entered, you will be presented with the first line start_number (default 100) - if this line already exists in the program, then the existing line will be presented. Otherwise, you will only see the current line number. Pressing the up and down arrow keys will move you to the previous line or the next line (respectively) in the program, although if there is no previous (or next) line, then you will exit the AUTO mode. However, if you press the Enter key, the next line number will be generated by adding step (default 10) to the current line number.

If you wish to escape this sequence, press the Break key <CTRL><SPACE>.

Example 1

Generating program lines: AUTO 1000,10

generates lines 1000,1010,1020,1030,… AUTO 10

generates lines 10,20,30,40,…. AUTO ,5

generates lines 100,105,110,115,…

Example 2

Adding line numbers to a numberless boot program: AUTO 100,10: MERGE flp1_boot

NOTE 1

A step value of zero returns ‘Bad Parameter’ (-15). You can however achieve this by using EDIT start_number instead.

NOTE 2

Did you realise that AUTO 200,10 is the same as EDIT 200,10 ?

NOTE 3

On non-Minerva ROMs AUTO uses the same routine as RENUM to check its parameters, which means that you can specify a start_line and an end_line, although they do nothing. For example:

AUTO 100 TO 1000;1000,20

would create lines 1000,1020,1040,…

NOTE 4

The maximum line number is 32767 - trying to use a higher line number will cause an overflow error.

NOTE 5

If start_number and step are not integer numbers, they will be rounded either up or down to the nearest integer (compare INT).

SMS NOTE

On current versions of SMS AUTO has been re-coded to be the same as ED, therefore it will not allow a second parameter, and merely places you in ED mode with the cursor at the specified start line number.

CROSS-REFERENCE

Please refer to EDIT which is very similar.

DLINE allows you to delete SuperBASIC lines.