Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Originally, BASIC did not contain an include file facility, now achieved with ++INCLUDE. To get around this problem, a pre-compiler was developed, and was used by many dealers, particularly in the UK. This pre-compiler uses $COPY to indicate a file to be included in exactly the same way. The difference is that $COPY statements may be nested, whereas ++INCLUDE statements may not. The pre-compiler generates an intermediate file (.PRE) which contains the expanded source, and which is then normally compiled automatically and erased. It may be left on disk, however, by specifying the /F switch. In addition, any of the compiler line switches may be specified, and these are passed on to the compilation phase.

The pre-compiler was traditionally called PREBAS under AMOS. As with the compiler itself, A-Shell contains two versions, one for BASIC 1.3 (OPRE) and one for BASIC 1.4 (PRE). A .DO file (with the name PREBAS if desired) may be set up to use the appropriate version.

As with ++INCLUDE, $COPY will accept either AMOS-format file specifications or host pathnames as arguments.