COMPACT
-------
by K Feary, Wendover, Buckinghamshire
from Your Computer, September 1985

COMPACT IS A set of three routines for the 16/48K Spectrum that will allow
you to reduce the size of a program and make it faster.

The first routine replaces the digits of a number with a decimal point. Since
the interpreter tests for '.' before BIN and numeric characters the number is
found sooner. However, once this has been done you will have to retype the
digits if you edit a line with numbers in, so it's best to use this routine
only when the program is fully debugged. Alternatively, you can protect digits
by adding REM to the beginning of a line.

The second routine reduces long variab1 names to two characters. The new
names will be A0, B0, C0 ... ZZ in the order the variables are used in the
program.

The final routine will join as many lines together as possible while ensuring
that the program still works and is not made slower. The line numbers in
GOTOs, etc. must be constants, but no check is made for LIST, LLIST, or SAVE
"" LINE, so these lines may "disappear".

All the routines, especially delete digits, can take some time to compact a
large program. Clearing the variables will reduce this slightly.

Type in and RUN the listed program. You'll be asked for the start address;
any high value will do as long as the program doesn't go beyond PRAMT. For
instance, to put Compact just below the UDGs enter 32108 or 64876 depending
on RAM size. When all the DATA has been POKEd the address of each routine
will be printed and the code SAVEd. To LOAD the code use:
	CLEAR start-1: LOAD "" CODE start
The routines can then be called in the usual way; ie. RAND USR (address of
routine).
