Home » Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/BasicComp/v1_24/Manual
!AWFeb95/Goodies/BasicComp/v1_24/Manual
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 |
Filename: | !AWFeb95/Goodies/BasicComp/v1_24/Manual |
Read OK: | ✔ |
File size: | 1585E bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/BasicComp/Manual
- Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/BasicComp/v1_24/Manual
File contents
A BasicV compressor and cross-referencer for RISC OS v1.40 17th July 1993 Copyright � Cy Booker, 1992�1994 Program and Documentation by Cy Booker 86 Church View Main Road Crockenhill Swanley Kent BR8 8JW U.K. �Typeset� using Impression v2.14 and Publisher v4.01 Menus grabbed by GrabMenu Musical entertainment provided by Frank Zappa 1 Overview 1 1.1 Disclaimer 1 1.2 Synopsis 1 1.3 Features 1 1.4 Documentation 2 1.5 Compressing your first file 3 1.6 Example speed 3 1.7 Example compression 4 2 BasCompress 5 2.1 Overview 5 2.2 Jargon 5 2.3 Basic 5 2.4 Numbers 6 2.5 SWI's 6 2.6 Star commands 7 2.7 Assembler 7 2.8 Routines 7 2.8.1 Main program 8 2.8.2 Start and end 8 2.8.3 Conditional routine end 8 2.8.4 END and ERROR 9 2.8.5 LOCAL ERROR 9 2.9 Multi-line structures 10 2.10 Libraries 11 2.10.1 Multiply-defined routines in libraries 11 2.11 Label reduction 12 2.12 Line numbers 13 2.12.1 Output line numbers 14 2.13 Multi-line output 14 2.14 DATA 14 2.15 Re-compressing 15 3 Cross-referencing 17 3.1 Overview 17 3.1.1 What's cross-referenced 17 3.1.2 What's output 17 3.1.3 Messages 17 3.2 Level of detail 18 3.2.1 Routine definition 18 3.2.2 Routine calls 19 3.2.3 Routine called by 19 3.2.4 Variable declaration 19 3.2.5 Variable assignment 19 3.2.6 Variable reference 19 3.3 Order 20 4 The front end 21 4.1 Starting 21 4.2 Overview 21 4.2.1 Icon bar icon 21 4.3 Control window 22 4.4 Main menu 23 4.5 Input 24 4.6 Output 26 4.7 Log 29 4.8 Special files 31 4.9 Cross-reference 32 4.10 Choices Dialogue Box 36 5 The back end 39 5.1 Invoking 39 5.2 Installing 39 5.3 Environment variables 40 5.4 The CLI parameters 41 5.4.1 Input 41 5.4.2 Output 42 5.4.2.1 Output listing 42 5.4.3 Log 43 5.4.4 Special 43 5.4.5 Cross-reference 43 5.4.5.1 What 44 5.4.5.2 How much 44 5.4.5.3 Order 45 5.5 Error handling 46 5.6 Escape handling 46 5.7 Hourglass 46 6 Special files 47 6.1 Why 47 6.2 Files 47 6.3 Format 48 6.3.1 Routines 48 6.3.2 Globals 48 6.3.3 Labels 49 6.3.3.1 Verbatim 50 6.3.3.2 Comma separated 50 6.3.3.3 Full pathname 51 6.3.3.4 Wimp menu 51 6.3.4 Variables as regular expressions 51 6.3.4.1 Example patterns 52 6.3.4.2 Limitations 53 6.3.5 Libraries 53 6.3.6 Include files 54 6.4 Limitations 54 7 Errors 57 7.1 Overview 57 7.2 Warnings 57 7.3 Errors 63 7.4 Run-time errors 69 7.4.1 Unknown or missing variable 69 7.4.2 No such function/procedure 69 7.4.3 Missing ENDIF 69 7.4.4 Logical errors 70 7.5 Internal errors 70 8 Loose ends 73 8.1 Memory usage 73 8.2 Missing THEN 73 8.3 Cross-reference 74 8.4 Statistics 75 8.5 Uncompressed output 75 8.6 Label reduction 76 8.7 Executable 76 Appendix A: Messages 77 A.1 Internationalism united 77 A.2 Format 77 Appendix B: Regular expressions 79 B.1 Definition 79 1 Overview 1.1 Disclaimer This program is supplied �as is�. No warranty, express or implied, of the merchantability of this program or its fitness for any particular purpose is given. In no circumstances shall the author, or any provider or distributor of this program, be liable for any damage, loss of profits, or any indirect or consequential loss arising out of the use of this program. 1.2 Synopsis BasCompress takes as input a tokenised basic file, analyses it on a routine-by-routine basis, and outputs a cross-reference and a compressed tokenised basic file. (It was written because none of the currently available Basic squashers handled the side effects of EVAL, removed unused routines, or discarded the junk inbetween routines, and they were all far too slow). It consists of two programs, a Wimp-based front end, and a CLI-based back end. The former is ideal for occasional use, while the later is better for scripts, make files, etc.. 1.3 Features The main features of BasCompress can be summarised as follows: � Checks all multi-line IFs have a matching ENDIF � Checks all CASE's have a matching ENDCASE � Checks all WHILE's have a matching ENDWHILE � Checks the ellipsis/quotes/brackets on each statement � It doesn't balk at the use of line numbers (too much) � Loads in explicit LIBRARY files � Checks every routine exits cleanly � Checks for multiply-defined routines � Produces a full cross-reference on all variables and routines, with four levels of detail, and user-definable ordering � Variable/routine name reduction, targetting the most used to be the shortest � Remove all redundant spaces and REMarks � Remove all between-routine junk � Concatenation of output lines � Remove unused code � Reduces numbers to their shortest form � Converts SYS and SWI strings to numbers � Optional �special� file to handle EVALuated variables/functions, and implicitly loaded library files � "special" file allows variables to be defined as regular expressions � It is fast In other words it does all you would expect, a bit more, and all at a very respectable speed. All those syntax checks may seem superfluous until you realise that most error handling code isn't always as fully debugged as it should be. 1.4 Documentation This document is split into several sections. First a full description of exactly what this program does to, and expects of, the input. This is followed by �3, a chapter on the powerful cross-referencing available. Not until �4 is the program itself described, the Wimp front end application. The back end application, accessible from the CLI is �5. Special files, their format and use are detailed in �6. �7 is what this author wishes every program documentation had, a complete list of errors and reasons why they occurred, and more importantly - some hints on how to get rid of them. Finally, �8 contains miscellanea, the junk that doesn't categorise too easily. 1.5 Compressing your first file Run the application. This will install the Wimp front end onto the icon bar icon and open the control window to the center of the screen. First of all drag the Log file icon to a Filer window (not another application, sorry). This file will contain information about the actions of the compression process. Now drag a Basic file onto the control window, to compress it. With the default options this Basic file will be analysed, the log file created and then automatically loaded into your resident text editor. If this is Edit, then don't close the Log window for now. Even if the Basic file was analysed without error, no output file was produced because none was defined. Just drag the output file icon from the control window onto a Filer window and start again. Now, because Edit still had a view of the Log file, this was automatically updated, using the current window size. This gives an extremely usable environment :-) Voila, a compressed basic file has been produced. If the log file reports any EVAL or DATA statements were found, it is possible that the program may not run. See the chapter on Special files for a way to handle this. (The quick way is to disable all variable and routine label reduction). Now read �2. 1.6 Example speed It takes BasCompress less than 20s to compress itself. This needs 4 special files, contains 40-odd source files (including libraries) totalling just over 450K, and compresses it down to 100K. And all this on an Arm2 off of the standard 440 hard-disc, with all the I/O overhead that that involves. 1.7 Example compression Here's how well BasCompress handles compressing an early version of the Wimp front end application: 192742 Total input size 29659 Maximum compression 29706 No decimal number analysis 31129 No SWI name analysis 35103 No concatenation of output lines 47421 No removal of unused code 51950 No reduction of labels The later ones are not accumulative, the non-reduction of labels (only) really does add on 57% to the output program size! 2 BasCompress 2.1 Overview This chapter concerns itself with Basic, and what BasCompress expects (and does) to it. 2.2 Jargon The following terms will be used quite frequently, so I'll explain what is meant by them: routine a procedure or function variable an (integer | real | string)[array] label the name of a routine or variable name a label with its (pre | post)fix E.g. the following table might help name label PROC_Zappa _Zappa Frank% Frank Cy$() Cy 2.3 Basic BasCompress will only except fully tokenised basic files, it does not accept text files. This program only knows about the tokens present in Basic V, v1.04. The behaviour of this program on Basic files on a version greater than this is undefined. Only one Basic file is parsed (but see �2.10). 2.4 Numbers BasCompress will interpret all numbers and try to output them in as compact a form as possible. This is most effective on long binary numbers, but can shorten many large decimal values as well. The analysis and output of (decimal) numbers requires the floating point emulator. For this reason this can be turned off, just in case you are very short on memory. Analysis of hexadecimal and binary numbers is always done, as this does not require any floating point math. 2.5 SWI's Acorn's interface to the operating system, the SWI is an elegant self-documenting system. However, for interpreted languages like Basic, the translation of a SWI name to a SWI number is relatively time-consuming. BasCompress will try to do this translation, leaving just a number. This provides both large space and large execution savings, particularly for Wimp programs that use SWI's during screen redraw (that's all of them!) In order for BasCompress to translate the SWI name, it must be a simple constant string expression. If it isn't, or it can't translate it, then it is left as it is - thus providing an (almost) fool-proof conversion. (A possible case of a complex string constant would be SYS "X"+ "OS_ReadC"). Both SYS calls (in Basic) and SWI calls (in assembler) are converted. Note also that the any modules used by the program should be resident at the time of compression, otherwise the SWI's will be unknown and thus BasCompress will leave them as strings. This is an easy mistake to make, and results in slower and longer compacted files being produced. This cases ud detected, and generates a suitable warning. 2.6 Star commands A backward compatibility feature of Basic V is it's allowance of *Commands anywhere in Basic. Modern programs should really put this in an OSCLI("..."), or better yet a SYS "OS_CLI", "...". However, since this is allowed, some programmers use it to introduce comments in programs by using the *| comment construct. BasCompress will remove these lines completely. It will also remove all unnecessary *'s and spaces. If this results in a complete removal of the statement, BasCompress may produce incorrect code if (and only if) this *command was just after an (explicit) THEN. Since this is extremely bad programming practised, this author felt the benefits gained far outweigh the possible side-effects. 2.7 Assembler BasCompress fully understands and compacts assembler statements. As part of this process, BasCompress also checks that the square bracket �[]� count on each statement is valid - which may be useful for detecting bugs in conditionally assembled code. All R0..R15 registers get translated to 0..15, this saves a lot of space. Also the integer EQU's can be renamed to DC's. Note that the single space left after some mnemonics is necessary, without it the Basic assembler will refuse to work. 2.8 Routines It is important to understand that BasCompress treats a program as a group of routines. Because of this it can remove any junk inbetween routines, i.e. comments not explicitly starting with a REM, that other squashers leave behind (and even try to analyse - producing many, many errors). Because a record is kept of what happens inside a routine, it is possible to conclude that a routine isn't actually needed in the output file - and so none of the routines that it calls are needed that bit less as well. Thus BasCompress can remove ALL unused routines from the output file. This is a very powerful feature. 2.8.1 Main program BasicV does not provide a clearly defined method for distinguishing the end of the main program, and the start of the subroutines. BasCompress treats everything from the start of the first file to the first routine definition (DEF PROC or DEF FN) to be the main program. This isn't ideal, as many main programs consists of an infinite loop followed by junk - however there is no easy way of recognising the true end of the main program, so you have to live with it as it is. If you wish to compress library files separately, i.e. files that do not contain a main routine at the start of a file, then this is easily accommodated. 2.8.2 Start and end The start of a Basic routine is very easily detected, it is a line that starts with DEF�FN or DEF�PROC. However, the end of a routine isn't so easy to detect. In the ideal world, every routine will have one, and only one exit that is a simple ENDPROC, or = <expr> on a line of its' own. However, we all live in the real world, and things are more complicated than that. 2.8.3 Conditional routine end For example, consider the following function: DEF FNmin(a, b) IF a>b THEN =b ELSE =a Now, the only way for BasCompress to recognise this construct is if it kept track of all branches of a conditional. This would involve a major upgrade, and would make the program just a code-generation pass away from a true compiler. So what BasCompress does is to ignore exits from a routine that occur on the same line as an IF. But, in the above example, the next line will be thought to be inside the function min. This usually results in a cascade of warning/error messages being generated. The only cure for it is to amend the offending function. The simplest way is to just put a dummy terminator in, e.g. DEF FNmin(a, b) IF a>b THEN =b ELSE =a = 0 Better yet, would be to code it �properly�: DEF FNmin(a, b) IF a>b THEN a=b = a There is also the problem of programs that prematurely terminate routines inside, say, a case structure. This happens quite often, because it makes for much shorter code, and so BasCompress recognises this, see �2.9. 2.8.4 END and ERROR Currently BasCompress does not recognise the fact that a routine may end with the END command, nor an unconditional ERROR. Since these are examples of bad-programming anyway, these are easily worked around by just adding a redundant ENDPROC or =0 afterwards. 2.8.5 LOCAL ERROR BasCompress fully recognises local error handlers, and will force the next input line to start a new output line accordingly. 2.9 Multi-line structures BasCompress keeps track of the current nesting level of all multi-line structures: � CASE ... ENDCASE � IF THEN ... ENDIF � REPEAT ... UNTIL � WHILE ... ENDWHILE It does this primarily to detect conditional exiting from a routine. For example, if an ENDPROC or = <expr> is detected inside such a structure, then BasCompress knows it isn't the true end of the routine, and so will ignore it. A very useful side-effect of this is that BasCompress detects programming errors in the use of these constructs, errors that the run time Basic interpreter allows through. These very often are genuine program mistakes, usually inside error-handling code that is not fully debugged. However, there are two caveats to this. Firstly, in order for BasCompress to do this it must assume that the start of any multi-line structure is not inside a one-line IF construct. Unfortunately, some programmers put a quick WHILE ... ENDWHILE loop in a one-line IF. BasCompress does not handle this correctly and this line needs to be split into a true multi-line IF. Secondly, and just as less seriously, BasicV is rather lax in it's attitude towards multi-line structures. For example: REPEAT i += 1 CASE x(i) OF WHEN 1: IF do_it THEN UNTIL FALSE:ENDPROC ENDIF ... ... ENDCASE UNTIL i>max_i Here, BasicV will rather carelessly execute the UNTIL, even though it isn't at the same nesting level as the matching REPEAT. BasCompress is not so lenient and it will refuse point blank to handle such code. It is another example of bad programming being used, and should be re-coded in another way. 2.10 Libraries The use of the LIBRARY call is recognised. It causes the appropriate file to be appended to the queue of files to be parsed, and the entire LIBRARY statement to be removed from the output. For this to work, BasCompress assumes a simple string constant follows the LIBRARY. If this is not the case and it uses a variable/routine parameter then you will need to set up a Special file. This will tell BasCompress what to expect the variable to be so it can load the correct file. Please refer to the �6. All LIBRARY files are only ever scanned once, even if it is included many times. 2.10.1 Multiply-defined routines in libraries Note that the loading of libraries, as performed by BasCompress is not exactly the same as the order that BasicV would have loaded them in. This could only cause a problem if multiply-defined routines exist, and further more these multiple definitions are themselves in library files, not the main file. If this situation does arise, then the kludge is: include the library containing the preferred definition twice, once before and once after the LIBRARY containing the unwanted definition. This will work because BasCompress will use the first loaded, and the uncompressed program would use the second! Of course, the loading of libraries will mean that the current directory and/or some system variables (e.g. App$Dir) may need to be set up - otherwise BasCompress will not be able to locate the library file. 2.11 Label reduction A lot of the time that BasicV takes to interpret a program is spent looking up variable names. BasCompress will attempt to reduce the long labels down to size, often producing dramatic space and speed improvements. The algorithm used ensures that the most used variables are chosen for the shortest variable names, and the names themselves are chosen so as to spread evenly across the name-space. Did you note the word attempt in the above paragraph. This is because basic is an interpreted language and provides the powerful commands EVAL and DATA, allowing expressions to be evaluated in the current context. For instance EVAL("zappa%") would yield the value of the variable zappa%. But, if BasCompress had reduced this variable down to, say, A% in the rest of the program (because it analysed the program in a different context) then what happens at run-time is you get a variable not found error. There are two solutions to this very common problem. The first is to disable label reduction on all variables of the type that are used in EVAL or DATA statements. This is extremely wasteful, but the only option available in other squashers. With BasCompress there is a much more elegant solution - you can specify all the labels that must not be reduced. Further more, these variables can be implied from the parameters passed to a routine! For example, many Wimp-based programs will have a menu-construction suite of routines. These will be passed a string that describes the menu. Inside this string will be references to variables that at run-time will point to more information (sub-menus or windows usually). With BasCompress, you can get it to analyse all these strings, extract the variables, and then reduce all other variables apart from those. This is a very powerful feature. See the �6 for more info. Note that BasCompress goes to the trouble of making sure that it never produces one of the �built-in� register labels used by the assembler (R0-R15, pc). On other basic squashers this can lead to VERY obscure bugs. Also worth mentioning is that any labels accessed inside deleted routines are automatically removed from the list of labels to reduce. This produces better results than just reducing all labels found. BasCompress can handle any number of labels, well as many as could fit into 16Mb of RAM :-) 2.12 Line numbers Normally line numbers are an anathema but there does exist a valid reason for using them in BasicV, and so line number handling has been included in BasCompress. The reason why line numbers may be needed is if a program claims more memory though the use of the END=<expr> construct. This has the unfortunate side-effect of removing all routine level info, so you have to GOTO the main program loop). Obviously, line numbers found in any library files are faulted as there is no valid reason for them being there. Note that in short programs it is just possible that there will be a GOTO to a destination outside both the main program and all other routines. Currently BasCompress does not handle this (rather rare) case. As a kludge, surround the offending code in a dummy routine. 2.12.1 Output line numbers If no line numbers were found then line numbering is easy. For single-file programs the line numbers keep to their original values, even if multi-line compaction is enabled. For multi-file programs the output file starts from 1 and increases in steps of 1. If line numbers were found then the line numbers in the original program are used for the original program part, and thereafter line numbers increment in steps of one for any further libraries. Unfortunately BasicV only allows line numbers up to around 65000 odd. This could possibly be a problem if the original program has line numbers up to, say, 64000, and includes quite a few library files. This is one of the few possible errors that are not checked for, as the possibility of it occurring are just so remote. 2.13 Multi-line output Normally as many statements are compressed onto one output line as will fit. This produces the smallest files as the overhead that Basic imposes on each line is reduced by quite a bit. However, it can produce code that runs slower. This is because it appears BasicV only notes the statement number of an implicit jump (e.g. after a FOR, WHILE, or REPEAT). And so if this is on statement 56 of a line, say, then it has to scan all along the line to find where to continue execution. This situation may be recognised in a future upgrade by forcing the statement after one of these cases to start on a new line. 2.14 DATA BasCompress recognises the possibility that DATA may not reside inside a routine. All �unlinked� DATA statements will still be included in the output file, but only if there is some code left that will READ it. Please note that variables used as DATA will require the use of Special files. 2.15 Re-compressing Although at first sight the notion of compressing an already compressed file may seem a waste of time, in actual fact it is not. This is because BasCompress compresses a whole line at a time, and then merges together two or more lines. This isn't done quite as optimally as possible, and sometimes extra colons are inserted. If the output is fed back into BasCompress these extra colons will be removed, as it will be obvious that they are truly redundant. This is best achieved by first compressing with reduction of function and procedure names only (thus ensuring �special� routines only parsed once), and then a second time with full reduction of variable names. 3 Cross-referencing 3.1 Overview The cross-referencing of a large program can provide many useful insights, providing you can organise the output so as not to swamp you with �useless� information. To this end you can control what gets include, the level of detail, and the ordering (with many types of ordering available). Note that the cross-referencing of variables and routines is completely independent. 3.1.1 What's cross-referenced The cross-reference contains only the routines and variables that will be included in the output file. Since dead code is usually removed, you have to tell BasCompress to keep in all would-be deleted stuff if you need a complete cross-reference. You can also control exactly what types of labels are included. Usually you'd keep the default (everything), but sometimes you don't care about all the real variables, say, and this is easily catered for. 3.1.2 What's output The result of the cross-referencing is sent to the cross-reference file, or the screen if none is specified. Since this is a lot of data, you will almost certainly want to use a file. The front end application has the ability to automatically load this into the resident text editor. 3.1.3 Messages The formatting of the cross-reference is defined using the external Messages file. By altering the following messages you can tailor the output of the program dramatically (see appendix A for description of format of messages):- Name Show label and its' qualifying string (�%s%s�) Comma Separates distinct references (�, �) SemiColon Separates similar references (�; �) They are currently set up to produce �one-line-per entry�. However, it is possible to change these three so that every distinct reference appears on each separate line, vis-a-vis: Name: \n\t%s%s Comma: \n\t SemiColon: ,% But note, you will probably need to alter all the titles used so that they start rather than end with a newline. (The \t expands to a tab character, this is usually better than many spaces, since cross-reference files are large enough as it is) 3.2 Level of detail There are four levels of detail supported by BasCompress: None suppresses output, obvious really Existence useful to just list the name of all the labels used Global gives the additional information of a count of the label usage Routine reports only each separate routine where a reference was made, this is probably the most useful option Line details the exact statement for every reference For the last two, each label has separate lists. For routines there is: defined, calls, called by; and for variables there is: declared, assigned, and referenced. Note that the main program itself is treated internally as a procedure, and so appears in the routine cross-reference. 3.2.1 Routine definition This gives the file and line numbers of the start and end of the routine. 3.2.2 Routine calls Lists the names of the routines called by this routine, and the line number of the call. 3.2.3 Routine called by Lists the names of the routines that calls this routine, and the line number of the call. If the list is empty then BasCompress knows that this routine is not needed in the output program, and so will not include it. 3.2.4 Variable declaration Where a label was �declared�. By this BasCompress means it is a formal parameter of a routine, or explicitly declared as LOCAL. 3.2.5 Variable assignment When ever a variable appears at the start of a statement. This includes assembler statements. Note that BasCompress sometimes thinks variable assignments are references. This happens in the following cases: � variable is passed to a routine with RETURN parameters � assignment after a one-line IF that is without a THEN Here's an example of the later: IF x<y x=y Because Bascompress doesn't try to understand the conditional, it doesn't know that a new statement has started and so can't categorise the second reference to x as an assignment. See �8.2. 3.2.6 Variable reference Any other instance of a variable other than the above two is taken to be a reference. BasCompress will not recognise the fact that x += 1 is actually both an assignment and a reference. BasCompress will also fail to recognise that var!0 = 1 only references var and does not assign to it. 3.3 Order There are many uses you can put to a list of labels, provided you can order them in the way you need. BasCompress allows you to specify as many levels of sorting as you would need, with all the types of ordering that are relevant to the labels! You can sort in either direction - top to bottom, or the more usual bottom to top. These are the following sort types currently supported: Name in Ascii order Type for routines: function, procedure for variables: integer, real, string, integer array, real array, string array Dictionary by name, but as it would appear in a dictionary Location the location of the reference Usage for routines: number of times it is called for variables: sum of the assignments and the references Note the needed for multi-level sorting. You would normally sort labels by name, and type; and references by name, type, and location. Trying to sort labels by location has no meaning, and will result in a seemingly random order. So it is not possible to list routines in the order they were defined in. 4 The front end This describes the Wimp front end application. This allows the user to set up the parameters for the back end program in a friendly way. 4.1 Starting A standard Archimedes application, just double-click the Filer icon to install the application onto the icon bar. For foreign users, see the appendix A describing the Message file . 4.2 Overview Because the back end works on, and produces, a number of whole files the format of this application is slightly unorthodox. Basically you use the standard Risc-Os method of dragging file icons to Filer windows (to define the output files), and then drag a basic file onto the application to invoke the back end application to compress it. This generates the new log, cross-reference, and output files. Not all of the output files need to be defined. Usually there is no need for a cross-reference. But, you will almost certainly want the log file defined, as otherwise you would not know what errors occurred, or anything else. It is almost a pre-requisite to have Edit running alongside this front end in order for you to view the log that the back end application produces. The loading of this log will normally be automatic. 4.2.1 Icon bar icon The icon bar icon shows some messages while the back end is active. This gives a visual reference to what is going on. Clicking SELECT on the icon bar icon brings the control window to the front of the window stack. Clicking ADJUST in the icon bar icon re-loads the last input file, using the new options. This is extremely handy. 4.3 Control window This is automatically opened to the center of the screen when the application starts. It allows you to quickly set up all the files to be used, and as a side effect it gives you the chance to open a menu somewhere other than in the bottom right of the screen :-). The left-most three icon groups act just like the save as dialogue boxes to be found on the menu. The special file is defined by dragging a Text file onto this window. More special files can be defined by editing the text field, appending a comma separated list of file names. 4.4 Main menu There is only one menu. Because the sub-menus are rather on the large side, it is recommended that you bring the menu up over the control window. This was the main reason for having a control window, as a convenient anchor for the menu. 4.5 Input This sub-menu defines various parameters affecting BasCompress's analysis of the input file. Allow multiply-defined routines It is better to leave this option un-ticked, so that if a routine is defined more than once an error is generated. This is the default. Ticking this option allows a routine to be defined more than once, with only warnings being given. See �2.10.1. Report multiple exits from a routine BasCompress needs to know when each and every routine ends. If it finds more than one exit it will report it. For large programs this can produce many warnings, and so these warnings can be disabled. See �2.8.3. Parse numbers This toggles whether BasCompress will try to reduce a string of decimal digits. Hexadecimal and binary numbers are always compressed. See �2.4. Convert SWIs to numbers There doesn't appear to be any reason to disable this. See �2.5. Force malformed SWI's to generate error Malformed SWI's are those that aren't simple strings, e.g. "X"+ "Wimp_Poll". With this enabled these generate an error, otherwise just a warning. See �2.5. Report unknown SWI's In order for BasCompress to convert a SWI string to a number the Module must be resident at the time of compression. If the module is not resident, then this warning will be given. This toggles the appearance of such warnings, and is usually left enabled. See �2.5. Process as a library file This option allows the input file to be treated as a library file. This means that no main program is expected, and any undefined variables and routines do not generate an error. Of course, using this option is usually pointless without also disabling all label reductions. 4.6 Output This sub-menu allows you to tailor how much compression is applied to the output programs. Redundant spaces and comments are always removed, since there seems little point in using baScompress without doing this. By default all compression is on. Save as This leads to a standard dialogue box, used to define the basic file that will be produced if the input is analysed without error. Concatenate lines Forces as many statements as possible onto each output line. This is usually very desirable as it produces quite substantially shorter code, but at the possible loss of a bit of execution speed. See �2.13. Remove unused routines Because BasCompress can work out exactly which routines are, and are not needed in the final program, then it can remove unused routines. This is the default, and there is little point in disabling it, other than creating a full cross-reference. List This leads to a simple sub-menu where you can specify the screen mode to use. When enabled, as BasCompress produces the output file it will switch to that screen mode and scroll the source and output in two separate columns. Although "pretty", it is also pretty useless, as this takes at least an order of magnitude longer to do, what with all that screen scrolling and printing. Reduce variable names By default, all variable types are reduced. The only conceivable use for disabling the reduction of these would be to circumvent the use of EVAL or DATA variables, although BasCompress provides a much better method, via the use of Special files. See �2.11. The final option, �E� suppression is used to stop BasCompress shortening any variables to a name beginning with an �E�. For the reason why this might be desirable, see �8.12. Reduce routine names By default, all procedure and function names are reduced. The only conceivable use for disabling the reduction of these would be to circumvent the use of function names used inside an EVAL construct, although BasCompress provides a much better method to handle this, via the use of Special files. 4.7 Log The log sub-menu controls what additional information may be inserted into the log file, along with the name of all files scanned and any warnings and errors. Save as This leads to a standard save as dialogue box, used to define the file to which the log will be dumped. This will be a standard Text file. Statistics This shows how many of each type of variable and routine there is altogether in the program. This includes all deleted labels. EVAL keyword DATA keyword READ keyword These will list out every line that contains such a keyword, indicating where BasCompress may introduce errors because of its' reduction of labels. Note that only the use of these keywords outside special routines is reported, as it is assumed the use of the keyword was fully handled by the Special file. Further note that DATA found outside any routine is just reported as unlinked. List input With this option ticked, the input basic is also listed inside the log file. This produces humongous files, as this is plain text Basic not tokenised Basic. 4.8 Special files Special files are used to help BasCompress to handle the EVALuation of variables. A special file consisting of a list of routines that are expected to contain this keyword, and/or a secondary list of any particular labels that must not be reduced. The writable menu item allows you to type in a full pathname. It is easier just to drag the file onto the control window, though. Warn undefined Normally it wouldn't matter that you have told BasCompress about special routines that aren't used in the input file. However there is still this option that will report superfluous definitions found in Special files. Show expansion With this item ticked, every special label constructed will generate a warning message into the log file. This can be useful for showing what you think should appear, and what BasCompress thinks should appear. 4.9 Cross-reference From here you define all aspects of the (rather large) cross-referencing sub-system. Save as This leads to a standard save as dialogue box, used to define the file to which the cross-reference will be dumped. This will be a standard Text file. Include deleted When ticked, this will force all the superfluous routines and variables to be included in the cross-reference. This is usually not such a good idea, as the process of deletion removes all the reference information. For a full cross-reference, also disable the removal of unused routines (see Output), which leaves this information in tact. Reference order This leads to an order dialogue box (see below) used to set the sorting criteria for the references. This is probably best left as the default: Name, Type, Location. Variables Routines These two items lead into identical sub-menus. They allow the cross-referencing to be defined for both independently. Verbosity This leads to a sub-menu where you can define the level of detail of the cross-referencing information. See �3.2. Types Used to define what types of variables or routines are included in the cross-reference. Usually this would be all types, but sometimes you might only want to know about the integers, say. Just de-tick all the others. Order This dialogue box is quite complicated. Basically, you are trying to define several layers of ordering. First of all everything is sorted according to the left hand column. Now BasCompress goes through these sorted items looking for a sequence of items that are the same, according to this ordering. Now, for each sequence found it will sort them again using whatever you have defined in column two. This recurses on each smaller and smaller sub-sequence to the columns on the right. Obviously, it isn't much use having two columns sorting by the same criteria, so BasCompress will not allow you to select it. You can delete a column by ADJUST clicking on the ordering already used. This will cause all columns to the right to shuffle one column to the left (this is quite a pleasing graphical effect :-) It isn't possible to have a �blank� column. If you attempt to create a blank column then your new column will be shifted to the left (yet another pleasing graphical effect :-) It is possible to delete all columns. This will cause the output to appear in a seemingly random order. Not much use, apart from seeing how good the hashing function is! Ordering by location is only meaningful for references. Using this option for variables or routines will result in a (seemingly) random order. The Dict. standards for dictionary, and is similar to Name, except instead of ordering by ASCII, order as it would appear in a... (guess). 4.10 Choices Dialogue Box This dialogue bog controls aspects of the front end application itself, not the back end. It grabs the input focus so that some keyboard short cuts can be used, must notably RETURN and ESCAPE. Also the bottom row of buttons can be pressed using F2, F3, etc.. Set This accepts the above values for the current session of BasCompress. For the effects to be permanent use either Save or Save full. Also see the note below about using outline fonts in dialogue boxes. Cancel This disregards any edits you have made to the above options. Save full Along with all the expected switches and sort ordering, also saved with the choices are the default names of the log, cross-reference and output files. This option saves the full pathname of each of these files, and would be used while developing a project, to save dragging the log and output files each session. Save As Save full but only the leaf names of the log, cross-reference and output files are saved. This is handy for more generic environments. For instance, if you always call your Wimp programs Wimp, then to make a standard application from this, the output file would be !RunImage, and this would be a better default to have than Output. Default This sets up everything to a default state, for when you've made a complete mess of the options. This default state can also be achieved by deleting the Choices file inside !BC.!fe, and restarting the application. Run BasCompressed file With this option ticked whenever an output file is specified it is immediately executed after being generated. This is useful while constructing a Special file, so the program can proceed and report the missing variables found :-) Load log file If a log file was specified then this is �opened� immediately after it is generated. On a properly set up system this would cause Edit to be loaded up automatically if necessary, and replace any version currently held if Edit is already resident. Multi-tasking at its best. Note that if you edit the �old� log file, then this smoothness is ruined, because Edit will open up a new window containing the new version. C'est la vie. Load cross-reference file Same as the above option, but loads the cross-reference file generated, if any. Name output as <Main> This is a kludge to reduce the size of both cross-reference and log files. As any Wimp application must use the full pathname of every file, this is what is passed to the back end application. However this causes the full pathname to be printed in every error message and reference. As a stop gap, this front end can be told to set the environment variable <Main> to the full pathname, and pass this to the back end application. It does mean you don't see the actual name of the file being processed, but that usually isn't a problem as you know that anyway. Output file leaf name same as input This option is useful when compressing lots of files from one directory to another, for example having compressed versions of all your library files. Having defined the output directory, the full pathname is constructed from this directory and the leaf name of the input file, saving quite a bit of typing. Use outline fonts in dialogue boxes BasCompress comes with two versions of all its� windows � with and without outline fonts. Users of low-resolution monitors may prefer to use the system font versions. Also, RiscPC users may have to use the �System font� windows for two reasons: first because the fontified windows use fonts at a different size (slightly larger for low resolution users) which looks ugly but more importantly because of a bug in the Window Manager that causes clicks on (genuine) font icons to cause the Wimp to �forget� the text font :( Note that for historical reasons changes to this option are not updated immediately but only take effect the next time BasCompress is run. 5 The back end This chapter describes the underlying CLI program, and how to use it effectively. By default all text output is to the screen. This can be redirected to separate log and cross-reference files, as required. 5.1 Invoking Double-clicking on the application directory from a Filer window will automatically start up the Wimp front end application. This is because no parameters were passed to the !Run file. If any parameters are passed to the application, i.e. you activated it from a command shell then the back end application is called direct. This application requires the floating point emulator module to be resident. This is automatically loaded from the current system resources. (Floating point arithmetic is only used to analyse and output decimal numbers, this can be disabled and so there will be no need to load the floating point emulator - this is not a recommended procedure, though). Also required to be resident is the authors' own library module: CAssembler. These modules are automatically loaded if not resident. 5.2 Installing There are two methods of installing BasCompress for easy use from a shell. One is to just install the application onto your Run$Path, and use it by *!BC file. This has the disadvantage in that you must remember the !. The much better alternative is to use the Alias$BasCompress that is set up for you in the !Boot file. Thus it is only required to run this !Boot file in your boot-up sequence, and then call BasCompress by *BasCompress file. In both the above it is essential that the !Run file gets executed, as this ensures auxiliary modules are resident and checks that there will be enough memory to start the application. 5.3 Environment variables Because the CLI limits command lines to (a paltry) 256 bytes, several tricks were used in order to make the front end application work effectively with the back end program (with full pathnames). These can be put to great advantage for CLI users. In all cases an unset, or empty variable is ignored. BasCompress$Options This should be a string of the same format as a normal parameter set, except missing the name of the input file (of course). With this you can override any of the built-in default values with your own preferred set. BasCompress$Output The name of the tokenised basic file produced. BasCompress$Log The name of the log file produced. BasCompress$XRef The name of the cross-reference file produced. BasCompress$Special The name of the special file(s) input (a comma separated list). BasCompress$Path A comma separated list of directories used to find Special files It should be noted that the front end application resets all of these variables (except the Path), so keep this in mind. 5.4 The CLI parameters The ordering of the parameters has been carefully set up so there is usually no need to name any parameters. BasCompress [-In] <file> [[-Out <file>] [[-Special] <files>] [[-Log] <file>] [[-XRefFile] <file>] [[-XRef] <n>] ... So for normal work you would have set up BasCompress$Options and you'd just do BasCompress @.MyProg @.Result @.Special @.Log "" 0. There is a -Help option to display a brief description of the available options. As with all all native Archimedes applications, switches toggle the previous state (OS_ReadArgs does not allow -f and +f). 5.4.1 Input -In <file> this must always be given -Library ignore undefined routines & main program (OFF) �2.8.1 -MultiDEF allow multiple definitions of the same routine (OFF) �2.10.1 -Number analyse decimal numbers (needs FPEmulator) (ON) � 2.4 -SWI convert SWI strings to numbers (ON) �2.5 -SWIBad fault malformed SWI names (OFF) �2.5 -SWIExist report unknown SWI strings (ON) �2.5 -WEndRtn report conditional exits (ON) �2.8.3 5.4.2 Output -ListOut <n> echo output in screen mode <n> (OFF) -Out <file> output file (see BasCompress$Output) -ReduceVar <type> -ReduceRtn <type> -Reduce <type> reduce these types of labels (irsIRSpf) �2.11 -Single no concatenation of output lines (OFF) �2.13 -Unused delete unused routines and variables (ON) �2.8 <type> is a string of these letters: p procedure f function r real variable i integer variable s string variable R real array variable I integer array variable S string array variable 5.4.2.1 Output listing First the mode is selected (-1 would select the current mode), and an appropriate warning or error generated if that mode is not available. Next a blue-on-white colour scheme is selected. Then the display is split into two columns, with the left column about 61% of the screen wide (80 columns in mode 16). The source listing is scrolled here. On the right column the output is scrolled. The source listing does not include any deleted routines, but does include all inter-routine junk. The output listing is as per the output file, in its' entirety. The right column is only updated each time a whole line has been amassed, which could take a while if maximum compression is selected. There isn't really much use for this option, as the time taken to scroll the screen takes far too long. 5.4.3 Log -DATA log lines containing DATA (ON) -EVAL log lines containing EVAL (ON) -Goto log lines containing line numbers (ON) -List echo input to log (OFF) -Log <file> output file (see BasCompress$Log) -READ log lines containing READ (ON) -Stats log program statistics (ON) 5.4.4 Special -Special <files> use comma list of <file> to resolve implicit usages (see BasCompress$Special and BasCompress$Path) -UnusedS report undefined special routines (OFF) -WSpLabel report label expansion results (OFF) 5.4.5 Cross-reference -XRefFile <file> output file (see BasCompress$XRef) 5.4.5.1 What -Deleted xref includes deleted variables and routines (OFF) -XIncVar <type> -XIncRtn <type> -XInc <type> xref these types of labels (irsIRSpf) �3.1.1 <type> is a string of these letters: p procedure f function r real variable i integer variable s string variable R real array variable I integer array variable S string array variable 5.4.5.2 How much -XRef <n> level of xref detail for both routines and variables �3.2 -XRtn <n> level of xref detail for routines (0) -XVar <n> level of xref detail for variables (0) <n> evaluates to a number from 0 to 4: 0 None 1 Existence - name 2 Global - name / count 3 Routine - reference to routine level 4 Line - reference to line level 5.4.5.3 Order -Sort <sort> order of all variable, routine, and reference sorting �3.3 -SRef <sort> order of cross�references (NTP) -SRtn <sort> order of routines (TN) -SVar <sort> order of variables (TN) <sort> is a string of these letters: N sort by name T sort by type D sort by name (in dictionary sense) P sort by position in source U sort by usage e.g. to sort by usage, name, then type = �UNT�. Lower case letters order top to bottom. 5.5 Error handling By errors, it is meant system errors (i.e. those generated by calls to the operating system). Admittedly, error handling is quite primitive in BasCompress. All calls to the operating system are tested for error condition, and if set this is immediately propagated all the way back to the user, with an appropriate message dumped in the log file. Errors occurring before the log file is opened are reported to the screen. In any case, an error safely closes all files opened by this application. 5.6 Escape handling As with error handling, this is fairly primitive. BasCompress can be aborted at any time, terminating immediately after closing all open files. Note that during the middle of program output the Basic file will be Type'd to Data, as a safeguard against loading it into BasicV. (This does not handle zero-length files very well - it hangs the machine). 5.7 Hourglass The hourglass is used to indicate BasCompress's progress. During parsing, the percentage shows how much has already been analysed. Note that because BasCompress can not know the total length of input beforehand, the percentage may actually go backwards as LIBRARY statements are parsed. During cross referencing, there is no percentage, but the bottom L.E.D. is on. Finally, during program output an accurate percentage is displayed, with the top L.E.D. on. 6 Special files This chapter explains the format of the Special files. These are auxiliary Text files used to give BasCompress some more information to help it compress better. See also the examples supplied on disc. 6.1 Why Special files are used to tell BasCompress how to cope with the following types of situation: � EVAL("Variable") � DATA Variable � LIBRARY "%."+ RoutineParameter$ � EVAL("FN_"+ RoutineParameter$) Because BasCompress reduces labels (see �2.11) using a global context, at run-time when BasicV tries to find these labels in the current context, it fails. Special files tell BasCompress which labels not to compress, either explicitly as in the first two cases or above, or implicitly (from routine parameters) as in the later two. 6.2 Files Special files are just plain Text files, in the format specified below. BasCompress allows more than one Special file to be defined (using a comma separated list), but it is far easier to use the #include directive inside a Special file, as shown below. Special files are found using the environment variable BasCompress$Path. By default this is not set up, but you may like to create a sub-directory BAscompress in your library and set this variable to ",%.BAscompress." in your boot-up sequence (note the trailing dot, as with all path variables). Here you would keep the one or two special files that handle your particular set of library files, and BasCompress will find them for you without you having to type in a full pathname every time. 6.3 Format The format of a Special file is fairly simple. Basically, (for variables) all you're trying to tell BasCompress is: � routine X has a string in parameter Y � inside routine X there is an EVAL � this constructs a new label Z from Y � don't reduce this label Z So all you do is give the name and expected parameters of a routine and tell BasCompress how to construct label Z. 6.3.1 Routines You give the name of a routine by: procedure foo(1) or, function bar(,1) The brackets are necessary if a routine doesn't have any parameters. The procedure definition above tells BasCompress to expect a (simple) string expression to be passed to the procedure foo at every call, as the sole parameter. The function definition says the first parameter is not important, but the second parameter will be a simple string. These prototypes are checked against what is actually found in the program proper, and an appropriate error generated if they don't match. There can be up to ten distinct string parameters [0-9], but you'll probably only ever need just one. 6.3.2 Globals Sometimes the EVAL isn't in any particular routine (or is used inside a nested routine structure not amenable to the above simplification), so you'd like to give the name of the labels not to reduce just once. This is easy because at the start of each Special file, BasCompress puts an implicit declaration of the main program as a routine, with no parameters. So you'd just start defining the global labels as normal routine labels. 6.3.3 Labels First of all an example: PROC_List(a, "Zappa", "Good") ... : DEF PROC_List(RETURN x, y$, z$) IF EVAL("Frank_"+ y$)<>0 THEN x += EVAL("FN_"+ z$+ "_Name(Cy%)") ENDIF ENDPROC this would be implemented as: procedure _List(, 1, 2) real Frank_\1 function _\2_Name integer Cy% Note the spaces to the left of the implicit declarations, and the case of the keywords as both of these are important. Also note the need to declare Cy% as another variable that must not be shortened. There is no attempt to verify that the <n> used was declared in the parameter list, but all undeclared <n> are reset to the empty string. Also there is only rudimentary checking done on the expansion template, so be sensible. The following table shows the exact words to use - note they must be lower case: real a real variable e.g. pi_by_2 integer an integer variable, e.g. count% string a string variable, e.g name$ real_array a real array variable, e.g. times() integer_array an integer variable, e.g. books%() string_array a string variable, e.g. titles$() procedure a procedure, e.g. PROC_total function a function, e.g. FNmin library load library file, e.g. %.Wimp BasCompress can currently interpret the simple string in a number of ways. These template expansion types are: 6.3.3.1 Verbatim \<n> causes the formal parameter <n> to be substituted verbatim. 6.3.3.2 Comma separated ,<n> treats parameter <n> as a comma separated list of strings to substitute, with optional spaces after each comma. Each value is extracted from the string in turn. Note that the string is expected to contain real variables only, i.e. no %, $, or (. For example: PROC_Music("Zappa,Varese,Stravinsky,Belew) ... : DEF PROC_Music(p$) LOCAL i, dummy i = INSTR(p$, ",") WHILE i>0 dummy = EVAL("FN_"+ LEFT$(p$, i-1)) p$ = MID$(p$, i+1) i = INSTR(p$, ",") ENDWHILE ENDPROC could get coded as: procedure _Music(1) function _,1 6.3.3.3 Full pathname @<n> parameter <n> is considered as a full pathname, and just the leaf name is substituted. For an example see �6.3.4 below. 6.3.3.4 Wimp menu �<n> <n> is taken to be a Wimp menu string. This means that after ">" and ":" a variable name is expected, terminated by a comma or the EOS. It is assumed that the implicit variables are all of the same type. If not just define several rules, one for each type. For example PROC_menu("Prog,Info>Info%,dSave as>SaveAs,Quit") may get coded as follows: procedure _menu(1) integer �1 real �1 6.3.4 Variables as regular expressions As well as the above special meta-characters BasCompress will now allow you to specify special variables (not routines or libraries) as a regular expression (a fancy wildcard expression). This means that instead of specifying one variable, you specify any variables that match a pattern. Special variables so specified can not contain any parameter substitution commands. They also behave in a slightly different manner. To process special variables defined as regular expressions BasCompress must use a separate pass, between parsing and output. This scans every variable (of the particular type) to see if it matches the specified pattern. If so, then the variable is flagged as being un-renamable � as expected. So what is a regular expression, and why would you want to use it? For a full description of regular expressions please see Appendix B, but all the useful features (two of them!) will be shown in the examples below. You would want to use regular expressions to specify a range of variables with the same sort of name � instead of specifying every single one individually. Eg say you have defined many constants such as 'Wimp_Initialise', 'Wimp_CloseDown', 'Wimp_GetRectangle', etc. and then used these constants in some DATA statements. Instead of having a (long) list of these variable names in the special file you would recognise that all of the variables begin with the pattern 'Wimp_' and tell BasCompress to mark all such variables as unrenamable. 6.3.4.1 Example patterns Here's how you would write the above example in a special file: procedure dummy() real Wimp_.* the important bit being the ".*". This should be read as "any character", "repeated 0 or more times". Ie as long as a variable starts with the five characters "Wimp_" the pattern is matched. Another frequent case is when variables have the same postfix - eg the pattern: integer .*CMOS\> would match all integers that end ("\>" means "match end of variable") in the letters CMOS, ie MosROMFrugalCMOS%, FontMaxCMOS%, etc... The specification that CMOS be at the end stops, say, MyCMOSvar% being matched by the pattern, as it otherwise would if this were not included. 6.3.4.2 Limitations Although a regular expression may be defined dependent on a special routine being called, this fact is currently ignored � all special variables specified using a regular expression are used during the pass. For this reason it is probably worthwhile to place all wild-card specifications as global � ie in the main program section of the special file. This limitation will not last long. Currently a variable that is recognised as matching a pattern is flagged as being referenced from the main program (in the cross reference) and not inside the special routine that specified the wildcard � but this will change in a later version. 6.3.5 Libraries As well as labels, libraries may be implicit. For example, here's a simple library handler: PROC_Load_Library("<Basic$Lib>.Wimp", 2) ... : DEF PROC_Load_Library(f$, v) LOCAL x LIBRARY file$ x = EVAL("FN_Init_"+ FNleaf(f$)) IF EVAL("Version_"+ FNleaf(f$))<v THEN ERROR 1, "Library too old" ENDIF ENDPROC Well, in real life you'd set up error handlers and note which libraries have already been loaded, but you get the idea. This could be coded as follows: procedure _Load_Library(1,) library \1 function _Init_@1 real Version_@1 Note the use of @<n> to extract the leaf name. In the output program the entire statement containing the LIBRARY is removed. Note that because BasCompress analyses the program in a linear fashion, the order of library routines may well be different from that used in the uncompressed program, (see �2.10). 6.3.6 Include files It is possible for special files to include other special files. Thus you will probably set up BasCompress$Path and a special file to handle your own set of standard libraries, and then... #include mylibs somewhere in the special file for each particular program. (Note that there are no spaces to the left of the #include, and don't put any quotes on the name either). Nesting level is not limited, and you can recurse. This will result in an infinite loop, with the only resort being to press escape to quit, and then examine the log file. 6.4 Limitations There can only be 250 odd total Special routines defined. If any one actually reaches this limit, then contact the author, it's easy to alter - at the expense of a slight increase in memory usage. There is of course one major limitation in that you have to specify the name of all the special files before processing the program. It would be nice to set up a system whereby if the program (maybe implicitly) loads in library X, then load up special file Y. However this would require re-finding all calls to the (new) Special routines - something that seems quite hard to do :-( Finally, you'd like to be able to take into account the scope of the variables so only the use of variables in scope are not reduced. But since BasicV only has one scope, this is not possible to implement safely, without some explicit help from the programmer by marking the scope of variables in some way. 7 Errors 7.1 Overview Errors and warnings can be generated at various stages of the game. They all look the same and are all sent to the current log (file / screen). The format is: file 1234 warning 3: message If there is no filename, then it indicates the error is global in scope, for example the �undefined routine� error generated when all files have been parsed. Warnings report non-fatal deficiencies. Errors report a major problem, and will stop any output file being generated. As with all text used by BasCompress, these error texts are held in the Messages file. It is worth pointing out that many warnings and errors may be generated after the seemingly innocent warnings 9 and 10. This means that BasCompress may have lost touch with what routine is being defined, and starts interpreting the junk inbetween routines as genuine code. So do check the log file from the start. 7.2 Warnings Most of the warnings are self explanatory. 1 Expecting PROC or FN after DEF In standard Basic, these are the only valid things after a DEF. This warning has never been encountered in debugged source! 2 DEF inside a routine This is generated because an earlier routine did not exit cleanly, and the program believes you are still in this routine. You need to fix the errant routine by terminating it properly, or simply appending a dummy routine end (ENDPROC or =�<expr>). 3 Unexpected period �.� A period on it's own is treated as the start of a number (e.g. �.7�). This warning is generated if a statement starts with a period and it is not in the assembler. 4 Mismatched quotes �"� Every line should have matching quotes. 5 Malformed hexadecimal number It is expected that a digit or a letter [0-9a-fA-F] comes after an &. 6 Malformed binary number It is expected that a 0 or 1 comes after a %. 7 Line number reference found This is given if line numbers are found in any libraries, since there is no valid reason for them being there. 8 Expecting routine name after PROC or FN A non-label character was found after one of these tokens. This very unlikely. 9 ENDPROC not at end of procedure This is generated if ENDPROC is found on a line containing an IF, i.e. it is ambiguous as to whether this is the genuine end of the procedure. Most of the time this causes no problems, but for short routines where this is the only way it exits then BasCompress will get confused as to the exact end of the routine. In this case you must either re-code the routine (recommended) or insert a dummy routine terminator (ENDPROC or =�<expr>). 10 = not at end of function This is generated if an �= <expr>� is found on a line containing an IF, i.e. it is ambiguous as to whether this is the genuine end of the function. Most of the time this causes no problems, but for short routines where this is the only way it exits then BasCompress will get confused as to the exact end of the routine. In this case you must either re-code the routine (recommended) or insert a dummy routine terminator (ENDPROC or =�<expr>). 11 Code found on last line of function There were more statements on the same line as the terminating �= <expr>� statement. Since these will never be executed by Basic then they should be removed. This warning could well turn up quite often if BasCompress is fed the output of other squashers. 12 Expecting a string after LIBRARY/INSTALL In order to be able to load in libraries BasCompress expects a simple constant string expression to follow these keywords. If this is not the case then you will need to set up a Special file to handle this situation. This warning is suppressed if inside a Special routine. 13 OVERLAY file(s) not scanned The OVERLAY keyword is not supported by BasCompress. 14 Unexpected �[� A running total of square brackets is kept. This indicates that something like �LDR�R0,�[[R1...]� was found. 15 Unexpected �]� A running total of square brackets is kept. This indicates that something like �LDR�R0,�[R1...]]� was found. 16 ENDPROC inside a %s structure Found a conditional exit from a procedure - this indicates a bad programming style. 17 = inside a %s structure Found a conditional exit from a function - this indicates a bad programming style. 18 Conditional %%s Found a conditional termination of a multi-line structure - this indicates a bad programming style. This may occur on lines like the following: IF x>0 THEN WHILE x>0:y+=FNy(x):x-=1:ENDWHILE Unfortunately BasCompress does not like this because it expects all multi-line constructs to start unconditionally. To cure this split the one-line IF into a multi-line IF. 19 Too many �(� found A running total of ellipsis is kept. This indicates something like �(1+2)(� was found. 20 Unexpected �)� found A running total of ellipsis is kept. This indicates something like �(1+2))� was found. 21 Routine %s already defined at %s This warns about multiply-defined routines. Since there are sometimes very good reasons for doing this this warning can be suppressed. 22 Malformed decimal number A bad decimal number was found. A decimal number is something beginning with a digit or a period and continuing as expected. The form of the number is always checked, but the compression may be turned off. 23 The (global) special routine %s is not defined anywhere This speaks for itself. It is only generated if the user has asked for it, as it is not usually relevant. 24 SWI name missing, or not simple It is normal to just have a string, variable, or number immediately after a SYS (SWI). This indicates that found something else - which may indicate a syntax error. 25 SWI �%s� is unknown The operating system has no record of what this SWI means. This indicates that either the module is not loaded at the time of compression, or it is misspelt. BasCompress will leave it as it is, producing longer and slower code. 26 Can't change to screen mode %d If the listing Mode could not be found, but a suitable alternative was possible. 27 Special variable %s has been used 28 Special routine %s has been used 29 Special library %s has been used These warnings are generated if the user has turned them on. They show the results of label expansion done at the instance of a call to a Special routine. 7.3 Errors Any errors encountered will stop the final output phase, but the program will soldier on parsing, so you can rectify all the errors in one hit. 2 ENDPROC found in a function This invariably follows warning 2, about DEF found inside a routine, which itself follows a warning 10, because the previous function did not terminate cleanly. 3 = found in a procedure This invariably follows warning 2, about DEF found inside a routine, which itself follows a warning 9, because the previous procedure did not terminate cleanly. 4 Routine %s already defined at %s It's either an error or a warning (21), and this is the error. 5 File error: %s Since there is minimal file accessing done (files are loaded in one hit), this usually just reports not being able to find a particular file/invalid file name - it is dependent on the underlying filing system. 6 End of file in middle of routine It is invalid for a routine to span across a file boundary. 7 Too many files (>254) I can't foresee anyone getting this error message! It is unlikely that this limitation would be lifted, either. 8 Undefined routine: %s (used %s) Generated after all files have been parsed, it warns of routines used but never defined. These are usually obscure routines only called in error handlers. If you know for sure that this routine will never be called, just put an empty version in your main file to suppress this error. 9 Undefined variable: %s (used %s) Not generated. 10 FOR not at start of statement This may be of some use - not much, but what the hey? (Maybe be on a one-line IF)? 11 Escape pressed, parsing aborted Not generated. Escapes just terminate program immediately in the current version. 12 File %s does not have a Basic file type This program only accepts tokenised Basic files - maybe the file is just not Type'd correctly. (Could be that it was saved under the CFS or some such, and you only gave the SCSIFS?) 13 File %s is too small to be a Basic type A rudimentary check on each Basic file is done - this is generated if it fails. 14 File is corrupted/not basic Each line of tokenised Basic has a header. As the file is parsed each header is checked and if invalid this error is generated and parsing of the file is aborted. 15 Escape pressed, xref aborted Not generated. Escapes just terminate program immediately in the current version. 16 Escape pressed, compression aborted Not generated. Escapes just terminate program immediately in the current version. 17 Unexpected %s in a %s structure This detects any foul-ups in multi-lined structures. The Basic interpreter allows some of these through without reporting an error. These errors allow you to fix the (very probably) mistakes. See warning 18. 18 Unexpected %s As error 17 above, but obviously outside any surrounding structure. 19 End of file in middle of assembler A special case of error 6, i.e. a routine did not end before the end of a file was found. 20 OTHERWISE not at start of line A simple error for a simple mistake. 21 WHEN not at start of line A simple error for a simple mistake. 22 Computed GOTO/GOSUB found Now, I ask you, is this how to program? BasCompress will refuse to work with such things, and who can blame it? 23 INSTALL/LIBRARY not at start of line This indicates a syntax error, probably. Or maybe an IF without a THEN, who knows? 24 INSTALL/LIBRARY can not be on a conditional line If you must, then split into a multi-line IF and try again. 25 The special routine �%s� was declared as having different parameters from those found here The number of parameters do not match - probably a wrong number of commas in the Special file. 26 The special routine �%s� wants a string constant for one of its' parameters This program only handles very simple constant string expressions, and this error indicates that the expression was not simple enough. 27 Line too long (max 256) This seems a reasonable upper limit on the line length of a Special file. 28 Line �%s� is not of a recognised form Syntax error for the Special file line. Note that if you specified a Text file full of control codes and such, then you may only get to read the last few words of this message. 29 Label �%s� is invalid In Special files, the label probably starts with a digit, or some such. 30 Parameter list �%s� is invalid In Special files: what more needs to be said? 31 Parameter list �%s� contains a duplicate In Special files: it is not exactly meaningful to have two or more parameters assigned to the same expansion number is it? 32 Implicit label substitution overflowed When a call to a Special routine is found, the label templates get expanded using the actual parameters passed. This error shows BasCompress checks for overflow in its' internal buffers! 33 Too many special routines (max 255) A perfectly reasonable limit it seems. This could easily be extended, though. 34 Unable to load special file (not Text?) Or maybe it wasn't found. Only Text files are accepted. 35 SWI name missing, or not simple It is normal to just have a string, variable, or number immediately after a SYS (SWI). This indicates that found something else - which may indicate an error. 36 Illegal screen mode If the listing mode could not be found, and no suitable alternative was possible, then this error is generated. 37 Bad main program, unterminated %s structure This is a special case, if the first routine found (DEF�PROC, or DEF�FN) was inside a multi-line structure. This indicates an error in the main program. 38 Can't find closing ellipsis in special routine parameter During label expansion, BasCompress found a label ending in (, which it took to mean the start of an array index. No closing ) was found before the end of the string. 39 Bad char `%c' following > or : in special routine parameter During label expansion, BasCompress expects the label to be terminated by a comma or the EOS. This indicates that this condition was not satisfied. 7.4 Run-time errors Here is some help with possible errors that BasCompress may introduce to the compressed Basic output. 7.4.1 Unknown or missing variable The quick and easy method to solve this problem is to turn of all label reduction. This is not recommend, as it makes the use of BasCompress almost worthless. This error has been generated because you have not told BasCompress about the side effects of an EVAL or DATA statements. See �2.11 for why this produces the error, and �6 for how to cure it. In essence you have to go through the program, locate the EVAL's and possibly the DATA statements as well, (look in the log file for exactly where to find these), and then build a Special file to tell BasCompress how to handle these. Usually this entails defining some �global� labels that will never be reduced, although sometimes it is possible to build a more sophisticated parameter-based rule. It may just be possible that this error is generated inside assembler. If so, then this indicates an error on BasCompress' part. Examples of such should be sent to the author for inclusion in upgrades. This possibility is extremely remote as BasCompress has been tested with a wide range of sources, but most cases where it has failed in the past has been in this area. 7.4.2 No such function/procedure This occurs for exactly the same reasons as detailed in �7.4.1 above. 7.4.3 Missing ENDIF These errors are generated very rarely, but they are just possible. Consider the following code: IF FN_SaveFile THEN :::REM comment What BasCompress could produce, although it does tries not to, is: IFFNxTHEN Obviously this is wrong, wrong, wrong. From a simple one-line conditional (that does nothing), BasCompress has produced a multi-line conditional construct where there shouldn't be any, and without the ENDIF. Since this situation is fairly rare, and BasCompress does handle it most of the time, it is not likely to be remedied - unless enough people request it. The work around is to not to ignore the return value from the function, which is probably an error status (indicating a very lazy programmer!), but to assign it to a variable, and then act on it accordingly. 7.4.4 Logical errors By this it is meant that a program doesn't generate any overt errors, it's just that it doesn't do the same as it did before compression. BasCompress has been tested quite thoroughly with a wide source of Basic programs, and it is hoped that all of these exceptional cases have been noted and duly handled. However if you do get this type of error, it is still probably because of EVAL and DATA being used with undeclared (and probably short, e.g. A%, x, etc.) variables. These variables may have been �renamed� by BasCompress, or even re-mapped to different variables, and hence contain an invalid value. If it is not because of this, then the author would appreciate it if an example of the incorrectly compressed source was sent in, so BasCompress could be updated to handle that case. 7.5 Internal errors These are �system� errors generated by BasCompress itself. These messages are hard-coded into the executable, and use the error number chunk &DCBC0 to &DCBFF: Error(s) during parsing This should never appear, as it is an internal error used to indicate an erroneous parsing stage. Invalid sort character '%c' Sort string too long Invalid type character `%c' These indicate rudimentary errors on the parameters passed on the CLI. Invalid option in system variable BasCompress$Options Indicates an invalid system variable. Unfortunately it is not possible to show exactly what was wrong with it, just that some part of it was wrong. 1.1 ... 10.1 These errors should never be generated. They indicate where BasCompress has found some inconsistencies in its' own internal data structures. Any occurrences of such should be sent, along with the source that produced them, to the author for correcting in future upgrades. 8 Loose ends The fact that this chapter exists shows that I'm no good at documentation :-) It mainly describes features that may (or may not) get implemented in future upgrades. 8.1 Memory usage Let's face it boys and girls, this program eats RAM like nobody's business. It's really just a fact of life for 32-bit/RISC machines. This is compounded by the need for some oomph (technical term) in the program execution stakes. To this end most things are kept on two separate lists - e.g. if a routine X calls Y then this is recorded both in X's calls list, and Y's called by list. This bit of redundancy probably doubles the speed of cross referencing, so it was felt worth it. Also all the source is kept in RAM, and all the output. There is some consideration to low-memory users in that the hash table sizes grow on request, but then again they start pretty big anyway :-) If enough people request it then BasCompress may be upgraded to include the option of smaller initial hash-tables and demand-loading the source - a simple hack & slap. 8.2 Missing THEN Basic allows the programmer to omit a THEN statement when used on a single-line IF compound. However, this can cause problems. Because BasCompress removes all spaces, if the condition ended with a digit, and the statement after the (missing) THEN starts with an �E� then Basic gets confused � thinking a real number (in exponent format) has been given. Eg the BasCompress produced line: IF x<>0E%=1 is wrong. There should be a space after the 0. This is very rare. A temporary cure is to stop BasCompress shortening any variables to names starting with an �E�. Although this will solve most problems, there is still the unresolved problem of the un-shortened variables. The only cure is to make sure the THEN is always used. A similar problem is the following BasCompress produced line: WHILE x<>0E%=2 The cure for this is to always separate the expression from the first statement of a WHILE compound by a colon. While testing this program, it became evident that the missing THEN was part of a general problem - skipping a Basic expression. This is harder than at first seems, because there is no point at where you can say �yes, here is the end�, as you can in a procedural call, say (e.g. you've found a comma, close ellipse and the bracket and quote count is zero). E.g. how would you handle this: IF a=b=c THEN P."hello" Intuition get's it wrong. Basic treats this as: IF (a=b) THEN =c ... Which means you have to build a tree/stack. But, once you can do this then this program could become quite interesting. It could evaluate constant sub-expressions. This could produce some very compact stuff, as you'd also be able to substitute constant variables with their values, and even eliminate dead code. I.e. debugging stuff that would never be executed because it is known that, say, Debug is always FALSE. But, tie that in with a bit more knowledge of the structure of the Basic, and it is almost easy to generate not tokenised Basic, but code. Well, I'm sure if enough people register, it will give this author the incentive to develop BasCompress into the fastest (and cheapest) Basic compiler. 8.3 Cross-reference It would be nice to have a toggle between multi-line and single-line (the current) output. This is fairly easy to do, but it'll require some experimentation :-) Also handy could be some ordering based on label length, or even the (approximate) size of a routine. Some rationalisation of the messages used is in order, too. Currently the program outputs some line feeds of its' own accord, which is decidedly against the grain. How about not listing the file that a routine is in? Or just the leaf of the filename. This would reduce the size of the output by quite a lot. The former would require the user to cross-reference (the cross-reference!) to find the file of the reference, though. 8.4 Statistics There are loads more statistics that could be done; � libraries that aren't needed � variables only ever declared (e.g. LOCALised but never used) � variables only ever assigned to once (constants) � lines where the memory indirection operators ?, | and ! are used � don't log all the deleted routines and variables, just count them � give a percentage of the code that is unused � percentage compression achieved on the used code � lines containing any user-defined basic token (e.g. PRINT) � time taken to load, parse, cross-reference, compress, write 8.5 Uncompressed output It would have been nice if there was an option to just remove the unused routines and merge all the libraries into one big file. This would give a nice listable program containing only the routines used. However this is currently unpossible, as BasCompress was never intended to produce anything but compressed code. (There are many places where �skip until hit non-space� is hard-coded, and it would take a rather long time to rationalise these so you could toggle it on/off.) Oh well. 8.6 Label reduction The reduction of labels isn't always as good as it could be. Currently BasCompress only judges the fitness of a label to be reduced on its' global usage. A better algorithm would take into consideration the nesting level of each usage, and use this to bias the reduction of labels towards those used inside loops. 8.7 Executable The current situation, with two separate applications is far from ideal. A better situation would be to have the back end program inside a module. This would have the added bonus of not needing to load in the Messages file every time it is run. Better yet would be to have the whole thing as one big Wimp application. Here many extras are possible because there would be direct access to the cross-reference database. For example it could create graphs of variable name distribution, provide the cross-reference in it's own window, where you could filter it given user criteria (such as name matching a regexp AND usage>3). But I don't think so, do you? Appendix A: Messages A.1 Internationalism united For users of a foreign extractment, the Messages directory contains the country-specific text files. Copy Default, to (say) Iceland and edit the messages, and if that is the configured country of the machine, then those messages will be loaded. Note it is sensible to keep a Default file as this will be loaded if no file of the configured country could be found. If you do make a translated messages file, the author would appreciate it greatly if you could send it in so every one can benefit. A.2 Format The message format is fairly obvious - just look at them to see what can and can't be done, but here's a quick summary. � Comments start with a # � Messages names start on a new line, and end in a colon � Messages start at the first non-space after the colon, and finish at the end of the line � Spaces can be done as �% � � Percents can be included using �%%� � The �parameter�s %s and %d are supplied by BasCompress, these are standard C printf() strings � The standard C escape sequences \b, \t, \n, \r, \xXX, \000, etc. can be used to insert those characters inside the messages � A message may be a selection: starts with a �%?� and consists of a comma separated list of alternatives Appendix B: Regular expressions B.1 Definition A regular expression (RE) is a fancy wild-carding system � i.e. you don�t need exact matches. A regular expression is really a mini�programming language with the following �commands�: . any character ^ start of line $ end of line [...] set of characters* Any other character matches itself There are also modifiers: | or, �re1|re2� match either RE1 or RE2 ~ not, �~c� matches anything but the next character + many, �re+� matches RE repeated one or more times * repeat, �re+� matches RE repeated zero or more times ? optional, �re?� matches RE repeated zero or one times Parenthesis () can be used to group REs Finally, there are memories: \{ start recording \} end recording, and place in next memory (starts with 1) \<n> \1, ... \9 will then match the corresponding memory * character sets: Character sets are used to match one of a group of characters. All characters are taken literally except ���, �]�, and �\�. The ��� indicates a range, unless it is the first or last character, or the first character after a previous range. The �\� can be used to include a �]� or a ��� in the set.
00000000 41 20 42 61 73 69 63 56 20 63 6f 6d 70 72 65 73 |A BasicV compres| 00000010 73 6f 72 20 61 6e 64 0a 63 72 6f 73 73 2d 72 65 |sor and.cross-re| 00000020 66 65 72 65 6e 63 65 72 20 66 6f 72 20 52 49 53 |ferencer for RIS| 00000030 43 20 4f 53 0a 76 31 2e 34 30 20 31 37 74 68 20 |C OS.v1.40 17th | 00000040 4a 75 6c 79 20 31 39 39 33 0a 43 6f 70 79 72 69 |July 1993.Copyri| 00000050 67 68 74 20 a9 20 43 79 20 42 6f 6f 6b 65 72 2c |ght . Cy Booker,| 00000060 20 31 39 39 32 99 31 39 39 34 0a 0a 0a 0a 0a 0a | 1992.1994......| 00000070 0a 0a 0c 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 50 72 |..............Pr| 00000080 6f 67 72 61 6d 0a 61 6e 64 0a 44 6f 63 75 6d 65 |ogram.and.Docume| 00000090 6e 74 61 74 69 6f 6e 0a 0a 0a 0a 62 79 0a 0a 0a |ntation....by...| 000000a0 0a 43 79 20 42 6f 6f 6b 65 72 0a 0a 38 36 20 43 |.Cy Booker..86 C| 000000b0 68 75 72 63 68 20 56 69 65 77 0a 0a 4d 61 69 6e |hurch View..Main| 000000c0 20 52 6f 61 64 0a 0a 43 72 6f 63 6b 65 6e 68 69 | Road..Crockenhi| 000000d0 6c 6c 0a 0a 53 77 61 6e 6c 65 79 0a 0a 4b 65 6e |ll..Swanley..Ken| 000000e0 74 0a 0a 42 52 38 20 38 4a 57 0a 0a 55 2e 4b 2e |t..BR8 8JW..U.K.| 000000f0 0a 0a 0a 0a 94 54 79 70 65 73 65 74 95 20 75 73 |.....Typeset. us| 00000100 69 6e 67 20 49 6d 70 72 65 73 73 69 6f 6e 20 76 |ing Impression v| 00000110 32 2e 31 34 20 61 6e 64 20 50 75 62 6c 69 73 68 |2.14 and Publish| 00000120 65 72 20 76 34 2e 30 31 0a 0a 4d 65 6e 75 73 20 |er v4.01..Menus | 00000130 67 72 61 62 62 65 64 20 62 79 20 47 72 61 62 4d |grabbed by GrabM| 00000140 65 6e 75 0a 0a 4d 75 73 69 63 61 6c 20 65 6e 74 |enu..Musical ent| 00000150 65 72 74 61 69 6e 6d 65 6e 74 20 70 72 6f 76 69 |ertainment provi| 00000160 64 65 64 20 62 79 20 46 72 61 6e 6b 20 5a 61 70 |ded by Frank Zap| 00000170 70 61 0a 0a 0c 0a 0a 31 20 4f 76 65 72 76 69 65 |pa.....1 Overvie| 00000180 77 09 31 0a 0a 31 2e 31 20 44 69 73 63 6c 61 69 |w.1..1.1 Disclai| 00000190 6d 65 72 09 31 0a 0a 31 2e 32 20 53 79 6e 6f 70 |mer.1..1.2 Synop| 000001a0 73 69 73 09 31 0a 0a 31 2e 33 20 46 65 61 74 75 |sis.1..1.3 Featu| 000001b0 72 65 73 09 31 0a 0a 31 2e 34 20 44 6f 63 75 6d |res.1..1.4 Docum| 000001c0 65 6e 74 61 74 69 6f 6e 09 32 0a 0a 31 2e 35 20 |entation.2..1.5 | 000001d0 43 6f 6d 70 72 65 73 73 69 6e 67 20 79 6f 75 72 |Compressing your| 000001e0 20 66 69 72 73 74 20 66 69 6c 65 09 33 0a 0a 31 | first file.3..1| 000001f0 2e 36 20 45 78 61 6d 70 6c 65 20 73 70 65 65 64 |.6 Example speed| 00000200 09 33 0a 0a 31 2e 37 20 45 78 61 6d 70 6c 65 20 |.3..1.7 Example | 00000210 63 6f 6d 70 72 65 73 73 69 6f 6e 09 34 0a 0a 32 |compression.4..2| 00000220 20 42 61 73 43 6f 6d 70 72 65 73 73 09 35 0a 0a | BasCompress.5..| 00000230 32 2e 31 20 4f 76 65 72 76 69 65 77 09 35 0a 0a |2.1 Overview.5..| 00000240 32 2e 32 20 4a 61 72 67 6f 6e 09 35 0a 0a 32 2e |2.2 Jargon.5..2.| 00000250 33 20 42 61 73 69 63 09 35 0a 0a 32 2e 34 20 4e |3 Basic.5..2.4 N| 00000260 75 6d 62 65 72 73 09 36 0a 0a 32 2e 35 20 53 57 |umbers.6..2.5 SW| 00000270 49 27 73 09 36 0a 0a 32 2e 36 20 53 74 61 72 20 |I's.6..2.6 Star | 00000280 63 6f 6d 6d 61 6e 64 73 09 37 0a 0a 32 2e 37 20 |commands.7..2.7 | 00000290 41 73 73 65 6d 62 6c 65 72 09 37 0a 0a 32 2e 38 |Assembler.7..2.8| 000002a0 20 52 6f 75 74 69 6e 65 73 09 37 0a 0a 32 2e 38 | Routines.7..2.8| 000002b0 2e 31 20 4d 61 69 6e 20 70 72 6f 67 72 61 6d 09 |.1 Main program.| 000002c0 38 0a 0a 32 2e 38 2e 32 20 53 74 61 72 74 20 61 |8..2.8.2 Start a| 000002d0 6e 64 20 65 6e 64 09 38 0a 0a 32 2e 38 2e 33 20 |nd end.8..2.8.3 | 000002e0 43 6f 6e 64 69 74 69 6f 6e 61 6c 20 72 6f 75 74 |Conditional rout| 000002f0 69 6e 65 20 65 6e 64 09 38 0a 0a 32 2e 38 2e 34 |ine end.8..2.8.4| 00000300 20 45 4e 44 20 61 6e 64 20 45 52 52 4f 52 09 39 | END and ERROR.9| 00000310 0a 0a 32 2e 38 2e 35 20 4c 4f 43 41 4c 20 45 52 |..2.8.5 LOCAL ER| 00000320 52 4f 52 09 39 0a 0a 32 2e 39 20 4d 75 6c 74 69 |ROR.9..2.9 Multi| 00000330 2d 6c 69 6e 65 20 73 74 72 75 63 74 75 72 65 73 |-line structures| 00000340 09 31 30 0a 0a 32 2e 31 30 20 4c 69 62 72 61 72 |.10..2.10 Librar| 00000350 69 65 73 09 31 31 0a 0a 32 2e 31 30 2e 31 20 4d |ies.11..2.10.1 M| 00000360 75 6c 74 69 70 6c 79 2d 64 65 66 69 6e 65 64 20 |ultiply-defined | 00000370 72 6f 75 74 69 6e 65 73 20 69 6e 20 6c 69 62 72 |routines in libr| 00000380 61 72 69 65 73 09 31 31 0a 0a 32 2e 31 31 20 4c |aries.11..2.11 L| 00000390 61 62 65 6c 20 72 65 64 75 63 74 69 6f 6e 09 31 |abel reduction.1| 000003a0 32 0a 0a 32 2e 31 32 20 4c 69 6e 65 20 6e 75 6d |2..2.12 Line num| 000003b0 62 65 72 73 09 31 33 0a 0a 32 2e 31 32 2e 31 20 |bers.13..2.12.1 | 000003c0 4f 75 74 70 75 74 20 6c 69 6e 65 20 6e 75 6d 62 |Output line numb| 000003d0 65 72 73 09 31 34 0a 0a 32 2e 31 33 20 4d 75 6c |ers.14..2.13 Mul| 000003e0 74 69 2d 6c 69 6e 65 20 6f 75 74 70 75 74 09 31 |ti-line output.1| 000003f0 34 0a 0a 32 2e 31 34 20 44 41 54 41 09 31 34 0a |4..2.14 DATA.14.| 00000400 0a 32 2e 31 35 20 52 65 2d 63 6f 6d 70 72 65 73 |.2.15 Re-compres| 00000410 73 69 6e 67 09 31 35 0a 0a 33 20 43 72 6f 73 73 |sing.15..3 Cross| 00000420 2d 72 65 66 65 72 65 6e 63 69 6e 67 09 31 37 0a |-referencing.17.| 00000430 0a 33 2e 31 20 4f 76 65 72 76 69 65 77 09 31 37 |.3.1 Overview.17| 00000440 0a 0a 33 2e 31 2e 31 20 57 68 61 74 27 73 20 63 |..3.1.1 What's c| 00000450 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 64 09 |ross-referenced.| 00000460 31 37 0a 0a 33 2e 31 2e 32 20 57 68 61 74 27 73 |17..3.1.2 What's| 00000470 20 6f 75 74 70 75 74 09 31 37 0a 0a 33 2e 31 2e | output.17..3.1.| 00000480 33 20 4d 65 73 73 61 67 65 73 09 31 37 0a 0a 33 |3 Messages.17..3| 00000490 2e 32 20 4c 65 76 65 6c 20 6f 66 20 64 65 74 61 |.2 Level of deta| 000004a0 69 6c 09 31 38 0a 0a 33 2e 32 2e 31 20 52 6f 75 |il.18..3.2.1 Rou| 000004b0 74 69 6e 65 20 64 65 66 69 6e 69 74 69 6f 6e 09 |tine definition.| 000004c0 31 38 0a 0a 33 2e 32 2e 32 20 52 6f 75 74 69 6e |18..3.2.2 Routin| 000004d0 65 20 63 61 6c 6c 73 09 31 39 0a 0a 33 2e 32 2e |e calls.19..3.2.| 000004e0 33 20 52 6f 75 74 69 6e 65 20 63 61 6c 6c 65 64 |3 Routine called| 000004f0 20 62 79 09 31 39 0a 0a 33 2e 32 2e 34 20 56 61 | by.19..3.2.4 Va| 00000500 72 69 61 62 6c 65 20 64 65 63 6c 61 72 61 74 69 |riable declarati| 00000510 6f 6e 09 31 39 0a 0a 33 2e 32 2e 35 20 56 61 72 |on.19..3.2.5 Var| 00000520 69 61 62 6c 65 20 61 73 73 69 67 6e 6d 65 6e 74 |iable assignment| 00000530 09 31 39 0a 0a 33 2e 32 2e 36 20 56 61 72 69 61 |.19..3.2.6 Varia| 00000540 62 6c 65 20 72 65 66 65 72 65 6e 63 65 09 31 39 |ble reference.19| 00000550 0a 0a 33 2e 33 20 4f 72 64 65 72 09 32 30 0a 0a |..3.3 Order.20..| 00000560 34 20 54 68 65 20 66 72 6f 6e 74 20 65 6e 64 09 |4 The front end.| 00000570 32 31 0a 0a 34 2e 31 20 53 74 61 72 74 69 6e 67 |21..4.1 Starting| 00000580 09 32 31 0a 0a 34 2e 32 20 4f 76 65 72 76 69 65 |.21..4.2 Overvie| 00000590 77 09 32 31 0a 0a 34 2e 32 2e 31 20 49 63 6f 6e |w.21..4.2.1 Icon| 000005a0 20 62 61 72 20 69 63 6f 6e 09 32 31 0a 0a 34 2e | bar icon.21..4.| 000005b0 33 20 43 6f 6e 74 72 6f 6c 20 77 69 6e 64 6f 77 |3 Control window| 000005c0 09 32 32 0a 0a 34 2e 34 20 4d 61 69 6e 20 6d 65 |.22..4.4 Main me| 000005d0 6e 75 09 32 33 0a 0a 34 2e 35 20 49 6e 70 75 74 |nu.23..4.5 Input| 000005e0 09 32 34 0a 0a 34 2e 36 20 4f 75 74 70 75 74 09 |.24..4.6 Output.| 000005f0 32 36 0a 0a 34 2e 37 20 4c 6f 67 09 32 39 0a 0a |26..4.7 Log.29..| 00000600 34 2e 38 20 53 70 65 63 69 61 6c 20 66 69 6c 65 |4.8 Special file| 00000610 73 09 33 31 0a 0a 34 2e 39 20 43 72 6f 73 73 2d |s.31..4.9 Cross-| 00000620 72 65 66 65 72 65 6e 63 65 09 33 32 0a 0a 34 2e |reference.32..4.| 00000630 31 30 20 43 68 6f 69 63 65 73 20 44 69 61 6c 6f |10 Choices Dialo| 00000640 67 75 65 20 42 6f 78 09 33 36 0a 0a 35 20 54 68 |gue Box.36..5 Th| 00000650 65 20 62 61 63 6b 20 65 6e 64 09 33 39 0a 0a 35 |e back end.39..5| 00000660 2e 31 20 49 6e 76 6f 6b 69 6e 67 09 33 39 0a 0a |.1 Invoking.39..| 00000670 35 2e 32 20 49 6e 73 74 61 6c 6c 69 6e 67 09 33 |5.2 Installing.3| 00000680 39 0a 0a 35 2e 33 20 45 6e 76 69 72 6f 6e 6d 65 |9..5.3 Environme| 00000690 6e 74 20 76 61 72 69 61 62 6c 65 73 09 34 30 0a |nt variables.40.| 000006a0 0a 35 2e 34 20 54 68 65 20 43 4c 49 20 70 61 72 |.5.4 The CLI par| 000006b0 61 6d 65 74 65 72 73 09 34 31 0a 0a 35 2e 34 2e |ameters.41..5.4.| 000006c0 31 20 49 6e 70 75 74 09 34 31 0a 0a 35 2e 34 2e |1 Input.41..5.4.| 000006d0 32 20 4f 75 74 70 75 74 09 34 32 0a 0a 35 2e 34 |2 Output.42..5.4| 000006e0 2e 32 2e 31 20 4f 75 74 70 75 74 20 6c 69 73 74 |.2.1 Output list| 000006f0 69 6e 67 09 34 32 0a 0a 35 2e 34 2e 33 20 4c 6f |ing.42..5.4.3 Lo| 00000700 67 09 34 33 0a 0a 35 2e 34 2e 34 20 53 70 65 63 |g.43..5.4.4 Spec| 00000710 69 61 6c 09 34 33 0a 0a 35 2e 34 2e 35 20 43 72 |ial.43..5.4.5 Cr| 00000720 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 09 34 33 |oss-reference.43| 00000730 0a 0a 35 2e 34 2e 35 2e 31 20 57 68 61 74 09 34 |..5.4.5.1 What.4| 00000740 34 0a 0a 35 2e 34 2e 35 2e 32 20 48 6f 77 20 6d |4..5.4.5.2 How m| 00000750 75 63 68 09 34 34 0a 0a 35 2e 34 2e 35 2e 33 20 |uch.44..5.4.5.3 | 00000760 4f 72 64 65 72 09 34 35 0a 0a 35 2e 35 20 45 72 |Order.45..5.5 Er| 00000770 72 6f 72 20 68 61 6e 64 6c 69 6e 67 09 34 36 0a |ror handling.46.| 00000780 0a 35 2e 36 20 45 73 63 61 70 65 20 68 61 6e 64 |.5.6 Escape hand| 00000790 6c 69 6e 67 09 34 36 0a 0a 35 2e 37 20 48 6f 75 |ling.46..5.7 Hou| 000007a0 72 67 6c 61 73 73 09 34 36 0a 0a 36 20 53 70 65 |rglass.46..6 Spe| 000007b0 63 69 61 6c 20 66 69 6c 65 73 09 34 37 0a 0a 36 |cial files.47..6| 000007c0 2e 31 20 57 68 79 09 34 37 0a 0a 36 2e 32 20 46 |.1 Why.47..6.2 F| 000007d0 69 6c 65 73 09 34 37 0a 0a 36 2e 33 20 46 6f 72 |iles.47..6.3 For| 000007e0 6d 61 74 09 34 38 0a 0a 36 2e 33 2e 31 20 52 6f |mat.48..6.3.1 Ro| 000007f0 75 74 69 6e 65 73 09 34 38 0a 0a 36 2e 33 2e 32 |utines.48..6.3.2| 00000800 20 47 6c 6f 62 61 6c 73 09 34 38 0a 0a 36 2e 33 | Globals.48..6.3| 00000810 2e 33 20 4c 61 62 65 6c 73 09 34 39 0a 0a 36 2e |.3 Labels.49..6.| 00000820 33 2e 33 2e 31 20 56 65 72 62 61 74 69 6d 09 35 |3.3.1 Verbatim.5| 00000830 30 0a 0a 36 2e 33 2e 33 2e 32 20 43 6f 6d 6d 61 |0..6.3.3.2 Comma| 00000840 20 73 65 70 61 72 61 74 65 64 09 35 30 0a 0a 36 | separated.50..6| 00000850 2e 33 2e 33 2e 33 20 46 75 6c 6c 20 70 61 74 68 |.3.3.3 Full path| 00000860 6e 61 6d 65 09 35 31 0a 0a 36 2e 33 2e 33 2e 34 |name.51..6.3.3.4| 00000870 20 57 69 6d 70 20 6d 65 6e 75 09 35 31 0a 0a 36 | Wimp menu.51..6| 00000880 2e 33 2e 34 20 56 61 72 69 61 62 6c 65 73 20 61 |.3.4 Variables a| 00000890 73 20 72 65 67 75 6c 61 72 20 65 78 70 72 65 73 |s regular expres| 000008a0 73 69 6f 6e 73 09 35 31 0a 0a 36 2e 33 2e 34 2e |sions.51..6.3.4.| 000008b0 31 20 45 78 61 6d 70 6c 65 20 70 61 74 74 65 72 |1 Example patter| 000008c0 6e 73 09 35 32 0a 0a 36 2e 33 2e 34 2e 32 20 4c |ns.52..6.3.4.2 L| 000008d0 69 6d 69 74 61 74 69 6f 6e 73 09 35 33 0a 0a 36 |imitations.53..6| 000008e0 2e 33 2e 35 20 4c 69 62 72 61 72 69 65 73 09 35 |.3.5 Libraries.5| 000008f0 33 0a 0a 36 2e 33 2e 36 20 49 6e 63 6c 75 64 65 |3..6.3.6 Include| 00000900 20 66 69 6c 65 73 09 35 34 0a 0a 36 2e 34 20 4c | files.54..6.4 L| 00000910 69 6d 69 74 61 74 69 6f 6e 73 09 35 34 0a 0a 37 |imitations.54..7| 00000920 20 45 72 72 6f 72 73 09 35 37 0a 0a 37 2e 31 20 | Errors.57..7.1 | 00000930 4f 76 65 72 76 69 65 77 09 35 37 0a 0a 37 2e 32 |Overview.57..7.2| 00000940 20 57 61 72 6e 69 6e 67 73 09 35 37 0a 0a 37 2e | Warnings.57..7.| 00000950 33 20 45 72 72 6f 72 73 09 36 33 0a 0a 37 2e 34 |3 Errors.63..7.4| 00000960 20 52 75 6e 2d 74 69 6d 65 20 65 72 72 6f 72 73 | Run-time errors| 00000970 09 36 39 0a 0a 37 2e 34 2e 31 20 55 6e 6b 6e 6f |.69..7.4.1 Unkno| 00000980 77 6e 20 6f 72 20 6d 69 73 73 69 6e 67 20 76 61 |wn or missing va| 00000990 72 69 61 62 6c 65 09 36 39 0a 0a 37 2e 34 2e 32 |riable.69..7.4.2| 000009a0 20 4e 6f 20 73 75 63 68 20 66 75 6e 63 74 69 6f | No such functio| 000009b0 6e 2f 70 72 6f 63 65 64 75 72 65 09 36 39 0a 0a |n/procedure.69..| 000009c0 37 2e 34 2e 33 20 4d 69 73 73 69 6e 67 20 45 4e |7.4.3 Missing EN| 000009d0 44 49 46 09 36 39 0a 0a 37 2e 34 2e 34 20 4c 6f |DIF.69..7.4.4 Lo| 000009e0 67 69 63 61 6c 20 65 72 72 6f 72 73 09 37 30 0a |gical errors.70.| 000009f0 0a 37 2e 35 20 49 6e 74 65 72 6e 61 6c 20 65 72 |.7.5 Internal er| 00000a00 72 6f 72 73 09 37 30 0a 0a 38 20 4c 6f 6f 73 65 |rors.70..8 Loose| 00000a10 20 65 6e 64 73 09 37 33 0a 0a 38 2e 31 20 4d 65 | ends.73..8.1 Me| 00000a20 6d 6f 72 79 20 75 73 61 67 65 09 37 33 0a 0a 38 |mory usage.73..8| 00000a30 2e 32 20 4d 69 73 73 69 6e 67 20 54 48 45 4e 09 |.2 Missing THEN.| 00000a40 37 33 0a 0a 38 2e 33 20 43 72 6f 73 73 2d 72 65 |73..8.3 Cross-re| 00000a50 66 65 72 65 6e 63 65 09 37 34 0a 0a 38 2e 34 20 |ference.74..8.4 | 00000a60 53 74 61 74 69 73 74 69 63 73 09 37 35 0a 0a 38 |Statistics.75..8| 00000a70 2e 35 20 55 6e 63 6f 6d 70 72 65 73 73 65 64 20 |.5 Uncompressed | 00000a80 6f 75 74 70 75 74 09 37 35 0a 0a 38 2e 36 20 4c |output.75..8.6 L| 00000a90 61 62 65 6c 20 72 65 64 75 63 74 69 6f 6e 09 37 |abel reduction.7| 00000aa0 36 0a 0a 38 2e 37 20 45 78 65 63 75 74 61 62 6c |6..8.7 Executabl| 00000ab0 65 09 37 36 0a 0a 41 70 70 65 6e 64 69 78 20 41 |e.76..Appendix A| 00000ac0 3a 20 4d 65 73 73 61 67 65 73 09 37 37 0a 0a 41 |: Messages.77..A| 00000ad0 2e 31 20 49 6e 74 65 72 6e 61 74 69 6f 6e 61 6c |.1 International| 00000ae0 69 73 6d 20 75 6e 69 74 65 64 09 37 37 0a 0a 41 |ism united.77..A| 00000af0 2e 32 20 46 6f 72 6d 61 74 09 37 37 0a 0a 41 70 |.2 Format.77..Ap| 00000b00 70 65 6e 64 69 78 20 42 3a 20 52 65 67 75 6c 61 |pendix B: Regula| 00000b10 72 20 65 78 70 72 65 73 73 69 6f 6e 73 09 37 39 |r expressions.79| 00000b20 0a 0a 42 2e 31 20 44 65 66 69 6e 69 74 69 6f 6e |..B.1 Definition| 00000b30 09 37 39 0a 0a 0a 0a 0c 0a 0a 31 20 4f 76 65 72 |.79.......1 Over| 00000b40 76 69 65 77 0a 0a 31 2e 31 20 44 69 73 63 6c 61 |view..1.1 Discla| 00000b50 69 6d 65 72 0a 0a 54 68 69 73 20 70 72 6f 67 72 |imer..This progr| 00000b60 61 6d 20 69 73 20 73 75 70 70 6c 69 65 64 20 94 |am is supplied .| 00000b70 61 73 20 69 73 95 2e 20 20 4e 6f 20 77 61 72 72 |as is.. No warr| 00000b80 61 6e 74 79 2c 20 65 78 70 72 65 73 73 20 6f 72 |anty, express or| 00000b90 20 69 6d 70 6c 69 65 64 2c 20 6f 66 20 74 68 65 | implied, of the| 00000ba0 20 20 6d 65 72 63 68 61 6e 74 61 62 69 6c 69 74 | merchantabilit| 00000bb0 79 20 6f 66 20 74 68 69 73 20 70 72 6f 67 72 61 |y of this progra| 00000bc0 6d 20 6f 72 20 69 74 73 20 66 69 74 6e 65 73 73 |m or its fitness| 00000bd0 20 66 6f 72 20 61 6e 79 20 70 61 72 74 69 63 75 | for any particu| 00000be0 6c 61 72 20 70 75 72 70 6f 73 65 20 69 73 20 67 |lar purpose is g| 00000bf0 69 76 65 6e 2e 20 20 49 6e 20 6e 6f 20 63 69 72 |iven. In no cir| 00000c00 63 75 6d 73 74 61 6e 63 65 73 20 73 68 61 6c 6c |cumstances shall| 00000c10 20 74 68 65 20 61 75 74 68 6f 72 2c 20 6f 72 20 | the author, or | 00000c20 61 6e 79 20 70 72 6f 76 69 64 65 72 20 6f 72 20 |any provider or | 00000c30 64 69 73 74 72 69 62 75 74 6f 72 20 6f 66 20 74 |distributor of t| 00000c40 68 69 73 20 70 72 6f 67 72 61 6d 2c 20 62 65 20 |his program, be | 00000c50 6c 69 61 62 6c 65 20 66 6f 72 20 61 6e 79 20 64 |liable for any d| 00000c60 61 6d 61 67 65 2c 20 6c 6f 73 73 20 6f 66 20 70 |amage, loss of p| 00000c70 72 6f 66 69 74 73 2c 20 6f 72 20 61 6e 79 20 69 |rofits, or any i| 00000c80 6e 64 69 72 65 63 74 20 6f 72 20 63 6f 6e 73 65 |ndirect or conse| 00000c90 71 75 65 6e 74 69 61 6c 20 6c 6f 73 73 20 61 72 |quential loss ar| 00000ca0 69 73 69 6e 67 20 6f 75 74 20 6f 66 20 74 68 65 |ising out of the| 00000cb0 20 75 73 65 20 6f 66 20 74 68 69 73 20 70 72 6f | use of this pro| 00000cc0 67 72 61 6d 2e 0a 0a 31 2e 32 20 53 79 6e 6f 70 |gram...1.2 Synop| 00000cd0 73 69 73 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 |sis..BasCompress| 00000ce0 20 74 61 6b 65 73 20 61 73 20 69 6e 70 75 74 20 | takes as input | 00000cf0 61 20 74 6f 6b 65 6e 69 73 65 64 20 62 61 73 69 |a tokenised basi| 00000d00 63 20 66 69 6c 65 2c 20 61 6e 61 6c 79 73 65 73 |c file, analyses| 00000d10 20 69 74 20 6f 6e 20 61 20 72 6f 75 74 69 6e 65 | it on a routine| 00000d20 2d 62 79 2d 72 6f 75 74 69 6e 65 20 62 61 73 69 |-by-routine basi| 00000d30 73 2c 20 61 6e 64 20 6f 75 74 70 75 74 73 20 61 |s, and outputs a| 00000d40 20 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 | cross-reference| 00000d50 20 61 6e 64 20 61 20 63 6f 6d 70 72 65 73 73 65 | and a compresse| 00000d60 64 20 74 6f 6b 65 6e 69 73 65 64 20 62 61 73 69 |d tokenised basi| 00000d70 63 20 66 69 6c 65 2e 0a 0a 28 49 74 20 77 61 73 |c file...(It was| 00000d80 20 77 72 69 74 74 65 6e 20 62 65 63 61 75 73 65 | written because| 00000d90 20 6e 6f 6e 65 20 6f 66 20 74 68 65 20 63 75 72 | none of the cur| 00000da0 72 65 6e 74 6c 79 20 61 76 61 69 6c 61 62 6c 65 |rently available| 00000db0 20 42 61 73 69 63 20 73 71 75 61 73 68 65 72 73 | Basic squashers| 00000dc0 20 68 61 6e 64 6c 65 64 20 74 68 65 20 73 69 64 | handled the sid| 00000dd0 65 20 65 66 66 65 63 74 73 20 6f 66 20 45 56 41 |e effects of EVA| 00000de0 4c 2c 20 72 65 6d 6f 76 65 64 20 75 6e 75 73 65 |L, removed unuse| 00000df0 64 20 72 6f 75 74 69 6e 65 73 2c 20 6f 72 20 64 |d routines, or d| 00000e00 69 73 63 61 72 64 65 64 20 74 68 65 20 6a 75 6e |iscarded the jun| 00000e10 6b 20 69 6e 62 65 74 77 65 65 6e 20 72 6f 75 74 |k inbetween rout| 00000e20 69 6e 65 73 2c 20 61 6e 64 20 74 68 65 79 20 77 |ines, and they w| 00000e30 65 72 65 20 61 6c 6c 20 66 61 72 20 74 6f 6f 20 |ere all far too | 00000e40 73 6c 6f 77 29 2e 0a 0a 49 74 20 63 6f 6e 73 69 |slow)...It consi| 00000e50 73 74 73 20 6f 66 20 74 77 6f 20 70 72 6f 67 72 |sts of two progr| 00000e60 61 6d 73 2c 20 61 20 57 69 6d 70 2d 62 61 73 65 |ams, a Wimp-base| 00000e70 64 20 66 72 6f 6e 74 20 65 6e 64 2c 20 61 6e 64 |d front end, and| 00000e80 20 61 20 43 4c 49 2d 62 61 73 65 64 20 62 61 63 | a CLI-based bac| 00000e90 6b 20 65 6e 64 2e 20 20 54 68 65 20 66 6f 72 6d |k end. The form| 00000ea0 65 72 20 69 73 20 69 64 65 61 6c 20 66 6f 72 20 |er is ideal for | 00000eb0 6f 63 63 61 73 69 6f 6e 61 6c 20 75 73 65 2c 20 |occasional use, | 00000ec0 77 68 69 6c 65 20 74 68 65 20 6c 61 74 65 72 20 |while the later | 00000ed0 69 73 20 62 65 74 74 65 72 20 66 6f 72 20 73 63 |is better for sc| 00000ee0 72 69 70 74 73 2c 20 6d 61 6b 65 20 66 69 6c 65 |ripts, make file| 00000ef0 73 2c 20 65 74 63 2e 2e 0a 0a 31 2e 33 20 46 65 |s, etc....1.3 Fe| 00000f00 61 74 75 72 65 73 0a 0a 54 68 65 20 6d 61 69 6e |atures..The main| 00000f10 20 66 65 61 74 75 72 65 73 20 6f 66 20 42 61 73 | features of Bas| 00000f20 43 6f 6d 70 72 65 73 73 20 63 61 6e 20 62 65 20 |Compress can be | 00000f30 73 75 6d 6d 61 72 69 73 65 64 20 61 73 20 66 6f |summarised as fo| 00000f40 6c 6c 6f 77 73 3a 0a 0a 09 8f 09 43 68 65 63 6b |llows:.....Check| 00000f50 73 20 61 6c 6c 20 6d 75 6c 74 69 2d 6c 69 6e 65 |s all multi-line| 00000f60 20 49 46 73 20 68 61 76 65 20 61 20 6d 61 74 63 | IFs have a matc| 00000f70 68 69 6e 67 20 45 4e 44 49 46 0a 0a 09 8f 09 43 |hing ENDIF.....C| 00000f80 68 65 63 6b 73 20 61 6c 6c 20 43 41 53 45 27 73 |hecks all CASE's| 00000f90 20 68 61 76 65 20 61 20 6d 61 74 63 68 69 6e 67 | have a matching| 00000fa0 20 45 4e 44 43 41 53 45 0a 0a 09 8f 09 43 68 65 | ENDCASE.....Che| 00000fb0 63 6b 73 20 61 6c 6c 20 57 48 49 4c 45 27 73 20 |cks all WHILE's | 00000fc0 68 61 76 65 20 61 20 6d 61 74 63 68 69 6e 67 20 |have a matching | 00000fd0 45 4e 44 57 48 49 4c 45 0a 0a 09 8f 09 43 68 65 |ENDWHILE.....Che| 00000fe0 63 6b 73 20 74 68 65 20 65 6c 6c 69 70 73 69 73 |cks the ellipsis| 00000ff0 2f 71 75 6f 74 65 73 2f 62 72 61 63 6b 65 74 73 |/quotes/brackets| 00001000 20 6f 6e 20 65 61 63 68 20 73 74 61 74 65 6d 65 | on each stateme| 00001010 6e 74 0a 0a 09 8f 09 49 74 20 64 6f 65 73 6e 27 |nt.....It doesn'| 00001020 74 20 62 61 6c 6b 20 61 74 20 74 68 65 20 75 73 |t balk at the us| 00001030 65 20 6f 66 20 6c 69 6e 65 20 6e 75 6d 62 65 72 |e of line number| 00001040 73 20 28 74 6f 6f 20 6d 75 63 68 29 0a 0a 09 8f |s (too much)....| 00001050 09 4c 6f 61 64 73 20 69 6e 20 65 78 70 6c 69 63 |.Loads in explic| 00001060 69 74 20 4c 49 42 52 41 52 59 20 66 69 6c 65 73 |it LIBRARY files| 00001070 0a 0a 09 8f 09 43 68 65 63 6b 73 20 65 76 65 72 |.....Checks ever| 00001080 79 20 72 6f 75 74 69 6e 65 20 65 78 69 74 73 20 |y routine exits | 00001090 63 6c 65 61 6e 6c 79 0a 0a 09 8f 09 43 68 65 63 |cleanly.....Chec| 000010a0 6b 73 20 66 6f 72 20 6d 75 6c 74 69 70 6c 79 2d |ks for multiply-| 000010b0 64 65 66 69 6e 65 64 20 72 6f 75 74 69 6e 65 73 |defined routines| 000010c0 0a 0a 09 8f 09 50 72 6f 64 75 63 65 73 20 61 20 |.....Produces a | 000010d0 66 75 6c 6c 20 63 72 6f 73 73 2d 72 65 66 65 72 |full cross-refer| 000010e0 65 6e 63 65 20 6f 6e 20 61 6c 6c 20 76 61 72 69 |ence on all vari| 000010f0 61 62 6c 65 73 20 61 6e 64 20 72 6f 75 74 69 6e |ables and routin| 00001100 65 73 2c 20 77 69 74 68 20 66 6f 75 72 20 6c 65 |es, with four le| 00001110 76 65 6c 73 20 6f 66 20 64 65 74 61 69 6c 2c 20 |vels of detail, | 00001120 61 6e 64 20 75 73 65 72 2d 64 65 66 69 6e 61 62 |and user-definab| 00001130 6c 65 20 6f 72 64 65 72 69 6e 67 0a 0a 09 8f 09 |le ordering.....| 00001140 56 61 72 69 61 62 6c 65 2f 72 6f 75 74 69 6e 65 |Variable/routine| 00001150 20 6e 61 6d 65 20 72 65 64 75 63 74 69 6f 6e 2c | name reduction,| 00001160 20 74 61 72 67 65 74 74 69 6e 67 20 74 68 65 20 | targetting the | 00001170 6d 6f 73 74 20 75 73 65 64 20 74 6f 20 62 65 20 |most used to be | 00001180 74 68 65 20 73 68 6f 72 74 65 73 74 0a 0a 09 8f |the shortest....| 00001190 09 52 65 6d 6f 76 65 20 61 6c 6c 20 72 65 64 75 |.Remove all redu| 000011a0 6e 64 61 6e 74 20 73 70 61 63 65 73 20 61 6e 64 |ndant spaces and| 000011b0 20 52 45 4d 61 72 6b 73 0a 0a 09 8f 09 52 65 6d | REMarks.....Rem| 000011c0 6f 76 65 20 61 6c 6c 20 62 65 74 77 65 65 6e 2d |ove all between-| 000011d0 72 6f 75 74 69 6e 65 20 6a 75 6e 6b 0a 0a 09 8f |routine junk....| 000011e0 09 43 6f 6e 63 61 74 65 6e 61 74 69 6f 6e 20 6f |.Concatenation o| 000011f0 66 20 6f 75 74 70 75 74 20 6c 69 6e 65 73 0a 0a |f output lines..| 00001200 09 8f 09 52 65 6d 6f 76 65 20 75 6e 75 73 65 64 |...Remove unused| 00001210 20 63 6f 64 65 0a 0a 09 8f 09 52 65 64 75 63 65 | code.....Reduce| 00001220 73 20 6e 75 6d 62 65 72 73 20 74 6f 20 74 68 65 |s numbers to the| 00001230 69 72 20 73 68 6f 72 74 65 73 74 20 66 6f 72 6d |ir shortest form| 00001240 0a 0a 09 8f 09 43 6f 6e 76 65 72 74 73 20 53 59 |.....Converts SY| 00001250 53 20 61 6e 64 20 53 57 49 20 73 74 72 69 6e 67 |S and SWI string| 00001260 73 20 74 6f 20 6e 75 6d 62 65 72 73 0a 0a 09 8f |s to numbers....| 00001270 09 4f 70 74 69 6f 6e 61 6c 20 94 73 70 65 63 69 |.Optional .speci| 00001280 61 6c 95 20 66 69 6c 65 20 74 6f 20 68 61 6e 64 |al. file to hand| 00001290 6c 65 20 45 56 41 4c 75 61 74 65 64 20 76 61 72 |le EVALuated var| 000012a0 69 61 62 6c 65 73 2f 66 75 6e 63 74 69 6f 6e 73 |iables/functions| 000012b0 2c 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 6c 79 |, and implicitly| 000012c0 20 6c 6f 61 64 65 64 20 6c 69 62 72 61 72 79 20 | loaded library | 000012d0 66 69 6c 65 73 0a 0a 09 8f 09 22 73 70 65 63 69 |files....."speci| 000012e0 61 6c 22 20 66 69 6c 65 20 61 6c 6c 6f 77 73 20 |al" file allows | 000012f0 76 61 72 69 61 62 6c 65 73 20 74 6f 20 62 65 20 |variables to be | 00001300 64 65 66 69 6e 65 64 20 61 73 20 72 65 67 75 6c |defined as regul| 00001310 61 72 20 65 78 70 72 65 73 73 69 6f 6e 73 0a 0a |ar expressions..| 00001320 09 8f 20 09 49 74 20 69 73 20 66 61 73 74 0a 0a |.. .It is fast..| 00001330 0a 0a 49 6e 20 6f 74 68 65 72 20 77 6f 72 64 73 |..In other words| 00001340 20 69 74 20 64 6f 65 73 20 61 6c 6c 20 79 6f 75 | it does all you| 00001350 20 77 6f 75 6c 64 20 65 78 70 65 63 74 2c 20 61 | would expect, a| 00001360 20 62 69 74 20 6d 6f 72 65 2c 20 61 6e 64 20 61 | bit more, and a| 00001370 6c 6c 20 61 74 20 61 20 76 65 72 79 20 72 65 73 |ll at a very res| 00001380 70 65 63 74 61 62 6c 65 20 73 70 65 65 64 2e 0a |pectable speed..| 00001390 0a 41 6c 6c 20 74 68 6f 73 65 20 73 79 6e 74 61 |.All those synta| 000013a0 78 20 63 68 65 63 6b 73 20 6d 61 79 20 73 65 65 |x checks may see| 000013b0 6d 20 73 75 70 65 72 66 6c 75 6f 75 73 20 75 6e |m superfluous un| 000013c0 74 69 6c 20 79 6f 75 20 72 65 61 6c 69 73 65 20 |til you realise | 000013d0 74 68 61 74 20 6d 6f 73 74 20 65 72 72 6f 72 20 |that most error | 000013e0 68 61 6e 64 6c 69 6e 67 20 63 6f 64 65 20 69 73 |handling code is| 000013f0 6e 27 74 20 61 6c 77 61 79 73 20 61 73 20 66 75 |n't always as fu| 00001400 6c 6c 79 20 64 65 62 75 67 67 65 64 20 61 73 20 |lly debugged as | 00001410 69 74 20 73 68 6f 75 6c 64 20 62 65 2e 0a 0a 31 |it should be...1| 00001420 2e 34 20 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e |.4 Documentation| 00001430 0a 0a 54 68 69 73 20 64 6f 63 75 6d 65 6e 74 20 |..This document | 00001440 69 73 20 73 70 6c 69 74 20 69 6e 74 6f 20 73 65 |is split into se| 00001450 76 65 72 61 6c 20 73 65 63 74 69 6f 6e 73 2e 20 |veral sections. | 00001460 20 46 69 72 73 74 20 61 20 66 75 6c 6c 20 64 65 | First a full de| 00001470 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 65 78 61 |scription of exa| 00001480 63 74 6c 79 20 77 68 61 74 20 74 68 69 73 20 70 |ctly what this p| 00001490 72 6f 67 72 61 6d 20 64 6f 65 73 20 74 6f 2c 20 |rogram does to, | 000014a0 61 6e 64 20 65 78 70 65 63 74 73 20 6f 66 2c 20 |and expects of, | 000014b0 74 68 65 20 69 6e 70 75 74 2e 20 20 54 68 69 73 |the input. This| 000014c0 20 69 73 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 | is followed by | 000014d0 a7 33 2c 20 61 20 63 68 61 70 74 65 72 20 6f 6e |.3, a chapter on| 000014e0 20 74 68 65 20 70 6f 77 65 72 66 75 6c 20 63 72 | the powerful cr| 000014f0 6f 73 73 2d 72 65 66 65 72 65 6e 63 69 6e 67 20 |oss-referencing | 00001500 61 76 61 69 6c 61 62 6c 65 2e 20 20 4e 6f 74 20 |available. Not | 00001510 75 6e 74 69 6c 20 a7 34 20 69 73 20 74 68 65 20 |until .4 is the | 00001520 70 72 6f 67 72 61 6d 20 69 74 73 65 6c 66 20 64 |program itself d| 00001530 65 73 63 72 69 62 65 64 2c 20 74 68 65 20 57 69 |escribed, the Wi| 00001540 6d 70 20 66 72 6f 6e 74 20 65 6e 64 20 61 70 70 |mp front end app| 00001550 6c 69 63 61 74 69 6f 6e 2e 20 20 54 68 65 20 62 |lication. The b| 00001560 61 63 6b 20 65 6e 64 20 61 70 70 6c 69 63 61 74 |ack end applicat| 00001570 69 6f 6e 2c 20 61 63 63 65 73 73 69 62 6c 65 20 |ion, accessible | 00001580 66 72 6f 6d 20 74 68 65 20 43 4c 49 20 69 73 20 |from the CLI is | 00001590 a7 35 2e 20 20 53 70 65 63 69 61 6c 20 66 69 6c |.5. Special fil| 000015a0 65 73 2c 20 74 68 65 69 72 20 66 6f 72 6d 61 74 |es, their format| 000015b0 20 61 6e 64 20 75 73 65 20 61 72 65 20 64 65 74 | and use are det| 000015c0 61 69 6c 65 64 20 69 6e 20 a7 36 2e 20 20 a7 37 |ailed in .6. .7| 000015d0 20 69 73 20 77 68 61 74 20 74 68 69 73 20 61 75 | is what this au| 000015e0 74 68 6f 72 20 77 69 73 68 65 73 20 65 76 65 72 |thor wishes ever| 000015f0 79 20 70 72 6f 67 72 61 6d 20 64 6f 63 75 6d 65 |y program docume| 00001600 6e 74 61 74 69 6f 6e 20 68 61 64 2c 20 61 20 63 |ntation had, a c| 00001610 6f 6d 70 6c 65 74 65 20 6c 69 73 74 20 6f 66 20 |omplete list of | 00001620 65 72 72 6f 72 73 20 61 6e 64 20 72 65 61 73 6f |errors and reaso| 00001630 6e 73 20 77 68 79 20 74 68 65 79 20 6f 63 63 75 |ns why they occu| 00001640 72 72 65 64 2c 20 61 6e 64 20 6d 6f 72 65 20 69 |rred, and more i| 00001650 6d 70 6f 72 74 61 6e 74 6c 79 20 2d 20 73 6f 6d |mportantly - som| 00001660 65 20 68 69 6e 74 73 20 6f 6e 20 68 6f 77 20 74 |e hints on how t| 00001670 6f 20 67 65 74 20 72 69 64 20 6f 66 20 74 68 65 |o get rid of the| 00001680 6d 2e 20 20 46 69 6e 61 6c 6c 79 2c 20 a7 38 20 |m. Finally, .8 | 00001690 63 6f 6e 74 61 69 6e 73 20 6d 69 73 63 65 6c 6c |contains miscell| 000016a0 61 6e 65 61 2c 20 74 68 65 20 6a 75 6e 6b 20 74 |anea, the junk t| 000016b0 68 61 74 20 64 6f 65 73 6e 27 74 20 63 61 74 65 |hat doesn't cate| 000016c0 67 6f 72 69 73 65 20 74 6f 6f 20 65 61 73 69 6c |gorise too easil| 000016d0 79 2e 0a 0a 31 2e 35 20 43 6f 6d 70 72 65 73 73 |y...1.5 Compress| 000016e0 69 6e 67 20 79 6f 75 72 20 66 69 72 73 74 20 66 |ing your first f| 000016f0 69 6c 65 0a 0a 52 75 6e 20 74 68 65 20 61 70 70 |ile..Run the app| 00001700 6c 69 63 61 74 69 6f 6e 2e 20 20 54 68 69 73 20 |lication. This | 00001710 77 69 6c 6c 20 69 6e 73 74 61 6c 6c 20 74 68 65 |will install the| 00001720 20 57 69 6d 70 20 66 72 6f 6e 74 20 65 6e 64 20 | Wimp front end | 00001730 6f 6e 74 6f 20 74 68 65 20 69 63 6f 6e 20 62 61 |onto the icon ba| 00001740 72 20 69 63 6f 6e 20 61 6e 64 20 6f 70 65 6e 20 |r icon and open | 00001750 74 68 65 20 63 6f 6e 74 72 6f 6c 20 77 69 6e 64 |the control wind| 00001760 6f 77 20 74 6f 20 74 68 65 20 63 65 6e 74 65 72 |ow to the center| 00001770 20 6f 66 20 74 68 65 20 73 63 72 65 65 6e 2e 0a | of the screen..| 00001780 0a 46 69 72 73 74 20 6f 66 20 61 6c 6c 20 64 72 |.First of all dr| 00001790 61 67 20 74 68 65 20 4c 6f 67 20 66 69 6c 65 20 |ag the Log file | 000017a0 69 63 6f 6e 20 74 6f 20 61 20 46 69 6c 65 72 20 |icon to a Filer | 000017b0 77 69 6e 64 6f 77 20 28 6e 6f 74 20 61 6e 6f 74 |window (not anot| 000017c0 68 65 72 20 61 70 70 6c 69 63 61 74 69 6f 6e 2c |her application,| 000017d0 20 73 6f 72 72 79 29 2e 20 20 54 68 69 73 20 66 | sorry). This f| 000017e0 69 6c 65 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e |ile will contain| 000017f0 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f | information abo| 00001800 75 74 20 74 68 65 20 61 63 74 69 6f 6e 73 20 6f |ut the actions o| 00001810 66 20 74 68 65 20 63 6f 6d 70 72 65 73 73 69 6f |f the compressio| 00001820 6e 20 70 72 6f 63 65 73 73 2e 20 20 4e 6f 77 20 |n process. Now | 00001830 64 72 61 67 20 61 20 42 61 73 69 63 20 66 69 6c |drag a Basic fil| 00001840 65 20 6f 6e 74 6f 20 74 68 65 20 63 6f 6e 74 72 |e onto the contr| 00001850 6f 6c 20 77 69 6e 64 6f 77 2c 20 74 6f 20 63 6f |ol window, to co| 00001860 6d 70 72 65 73 73 20 69 74 2e 0a 0a 57 69 74 68 |mpress it...With| 00001870 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 | the default opt| 00001880 69 6f 6e 73 20 74 68 69 73 20 42 61 73 69 63 20 |ions this Basic | 00001890 66 69 6c 65 20 77 69 6c 6c 20 62 65 20 61 6e 61 |file will be ana| 000018a0 6c 79 73 65 64 2c 20 74 68 65 20 6c 6f 67 20 66 |lysed, the log f| 000018b0 69 6c 65 20 63 72 65 61 74 65 64 20 61 6e 64 20 |ile created and | 000018c0 74 68 65 6e 20 61 75 74 6f 6d 61 74 69 63 61 6c |then automatical| 000018d0 6c 79 20 6c 6f 61 64 65 64 20 69 6e 74 6f 20 79 |ly loaded into y| 000018e0 6f 75 72 20 72 65 73 69 64 65 6e 74 20 74 65 78 |our resident tex| 000018f0 74 20 65 64 69 74 6f 72 2e 20 20 49 66 20 74 68 |t editor. If th| 00001900 69 73 20 69 73 20 45 64 69 74 2c 20 74 68 65 6e |is is Edit, then| 00001910 20 64 6f 6e 27 74 20 63 6c 6f 73 65 20 74 68 65 | don't close the| 00001920 20 4c 6f 67 20 77 69 6e 64 6f 77 20 66 6f 72 20 | Log window for | 00001930 6e 6f 77 2e 0a 0a 45 76 65 6e 20 69 66 20 74 68 |now...Even if th| 00001940 65 20 42 61 73 69 63 20 66 69 6c 65 20 77 61 73 |e Basic file was| 00001950 20 61 6e 61 6c 79 73 65 64 20 77 69 74 68 6f 75 | analysed withou| 00001960 74 20 65 72 72 6f 72 2c 20 6e 6f 20 6f 75 74 70 |t error, no outp| 00001970 75 74 20 66 69 6c 65 20 77 61 73 20 70 72 6f 64 |ut file was prod| 00001980 75 63 65 64 20 62 65 63 61 75 73 65 20 6e 6f 6e |uced because non| 00001990 65 20 77 61 73 20 64 65 66 69 6e 65 64 2e 20 20 |e was defined. | 000019a0 4a 75 73 74 20 64 72 61 67 20 74 68 65 20 6f 75 |Just drag the ou| 000019b0 74 70 75 74 20 66 69 6c 65 20 69 63 6f 6e 20 66 |tput file icon f| 000019c0 72 6f 6d 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 |rom the control | 000019d0 77 69 6e 64 6f 77 20 6f 6e 74 6f 20 61 20 46 69 |window onto a Fi| 000019e0 6c 65 72 20 77 69 6e 64 6f 77 20 61 6e 64 20 73 |ler window and s| 000019f0 74 61 72 74 20 61 67 61 69 6e 2e 0a 0a 4e 6f 77 |tart again...Now| 00001a00 2c 20 62 65 63 61 75 73 65 20 45 64 69 74 20 73 |, because Edit s| 00001a10 74 69 6c 6c 20 68 61 64 20 61 20 76 69 65 77 20 |till had a view | 00001a20 6f 66 20 74 68 65 20 4c 6f 67 20 66 69 6c 65 2c |of the Log file,| 00001a30 20 74 68 69 73 20 77 61 73 20 61 75 74 6f 6d 61 | this was automa| 00001a40 74 69 63 61 6c 6c 79 20 75 70 64 61 74 65 64 2c |tically updated,| 00001a50 20 75 73 69 6e 67 20 74 68 65 20 63 75 72 72 65 | using the curre| 00001a60 6e 74 20 77 69 6e 64 6f 77 20 73 69 7a 65 2e 20 |nt window size. | 00001a70 20 54 68 69 73 20 67 69 76 65 73 20 61 6e 20 65 | This gives an e| 00001a80 78 74 72 65 6d 65 6c 79 20 75 73 61 62 6c 65 20 |xtremely usable | 00001a90 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 3a 2d 29 0a |environment :-).| 00001aa0 0a 56 6f 69 6c 61 2c 20 61 20 63 6f 6d 70 72 65 |.Voila, a compre| 00001ab0 73 73 65 64 20 62 61 73 69 63 20 66 69 6c 65 20 |ssed basic file | 00001ac0 68 61 73 20 62 65 65 6e 20 70 72 6f 64 75 63 65 |has been produce| 00001ad0 64 2e 0a 0a 49 66 20 74 68 65 20 6c 6f 67 20 66 |d...If the log f| 00001ae0 69 6c 65 20 72 65 70 6f 72 74 73 20 61 6e 79 20 |ile reports any | 00001af0 45 56 41 4c 20 6f 72 20 44 41 54 41 20 73 74 61 |EVAL or DATA sta| 00001b00 74 65 6d 65 6e 74 73 20 77 65 72 65 20 66 6f 75 |tements were fou| 00001b10 6e 64 2c 20 69 74 20 69 73 20 70 6f 73 73 69 62 |nd, it is possib| 00001b20 6c 65 20 74 68 61 74 20 74 68 65 20 70 72 6f 67 |le that the prog| 00001b30 72 61 6d 20 6d 61 79 20 6e 6f 74 20 72 75 6e 2e |ram may not run.| 00001b40 20 20 53 65 65 20 74 68 65 20 63 68 61 70 74 65 | See the chapte| 00001b50 72 20 6f 6e 20 53 70 65 63 69 61 6c 20 66 69 6c |r on Special fil| 00001b60 65 73 20 66 6f 72 20 61 20 77 61 79 20 74 6f 20 |es for a way to | 00001b70 68 61 6e 64 6c 65 20 74 68 69 73 2e 20 20 28 54 |handle this. (T| 00001b80 68 65 20 71 75 69 63 6b 20 77 61 79 20 69 73 20 |he quick way is | 00001b90 74 6f 20 64 69 73 61 62 6c 65 20 61 6c 6c 20 76 |to disable all v| 00001ba0 61 72 69 61 62 6c 65 20 61 6e 64 20 72 6f 75 74 |ariable and rout| 00001bb0 69 6e 65 20 6c 61 62 65 6c 20 72 65 64 75 63 74 |ine label reduct| 00001bc0 69 6f 6e 29 2e 0a 0a 4e 6f 77 20 72 65 61 64 20 |ion)...Now read | 00001bd0 a7 32 2e 0a 0a 31 2e 36 20 45 78 61 6d 70 6c 65 |.2...1.6 Example| 00001be0 20 73 70 65 65 64 0a 0a 49 74 20 74 61 6b 65 73 | speed..It takes| 00001bf0 20 42 61 73 43 6f 6d 70 72 65 73 73 20 6c 65 73 | BasCompress les| 00001c00 73 20 74 68 61 6e 20 32 30 73 20 74 6f 20 63 6f |s than 20s to co| 00001c10 6d 70 72 65 73 73 20 69 74 73 65 6c 66 2e 20 20 |mpress itself. | 00001c20 54 68 69 73 20 6e 65 65 64 73 20 34 20 73 70 65 |This needs 4 spe| 00001c30 63 69 61 6c 20 66 69 6c 65 73 2c 20 63 6f 6e 74 |cial files, cont| 00001c40 61 69 6e 73 20 34 30 2d 6f 64 64 20 73 6f 75 72 |ains 40-odd sour| 00001c50 63 65 20 66 69 6c 65 73 20 28 69 6e 63 6c 75 64 |ce files (includ| 00001c60 69 6e 67 20 6c 69 62 72 61 72 69 65 73 29 20 74 |ing libraries) t| 00001c70 6f 74 61 6c 6c 69 6e 67 20 6a 75 73 74 20 6f 76 |otalling just ov| 00001c80 65 72 20 34 35 30 4b 2c 20 61 6e 64 20 63 6f 6d |er 450K, and com| 00001c90 70 72 65 73 73 65 73 20 69 74 20 64 6f 77 6e 20 |presses it down | 00001ca0 74 6f 20 31 30 30 4b 2e 20 20 41 6e 64 20 61 6c |to 100K. And al| 00001cb0 6c 20 74 68 69 73 20 6f 6e 20 61 6e 20 41 72 6d |l this on an Arm| 00001cc0 32 20 6f 66 66 20 6f 66 20 74 68 65 20 73 74 61 |2 off of the sta| 00001cd0 6e 64 61 72 64 20 34 34 30 20 68 61 72 64 2d 64 |ndard 440 hard-d| 00001ce0 69 73 63 2c 20 77 69 74 68 20 61 6c 6c 20 74 68 |isc, with all th| 00001cf0 65 20 49 2f 4f 20 6f 76 65 72 68 65 61 64 20 74 |e I/O overhead t| 00001d00 68 61 74 20 74 68 61 74 20 69 6e 76 6f 6c 76 65 |hat that involve| 00001d10 73 2e 0a 0a 31 2e 37 20 45 78 61 6d 70 6c 65 20 |s...1.7 Example | 00001d20 63 6f 6d 70 72 65 73 73 69 6f 6e 0a 0a 48 65 72 |compression..Her| 00001d30 65 27 73 20 68 6f 77 20 77 65 6c 6c 20 42 61 73 |e's how well Bas| 00001d40 43 6f 6d 70 72 65 73 73 20 68 61 6e 64 6c 65 73 |Compress handles| 00001d50 20 63 6f 6d 70 72 65 73 73 69 6e 67 20 61 6e 20 | compressing an | 00001d60 65 61 72 6c 79 20 76 65 72 73 69 6f 6e 20 6f 66 |early version of| 00001d70 20 74 68 65 20 57 69 6d 70 20 66 72 6f 6e 74 20 | the Wimp front | 00001d80 65 6e 64 20 61 70 70 6c 69 63 61 74 69 6f 6e 3a |end application:| 00001d90 0a 0a 09 31 39 32 37 34 32 09 54 6f 74 61 6c 20 |...192742.Total | 00001da0 69 6e 70 75 74 20 73 69 7a 65 0a 0a 09 32 39 36 |input size...296| 00001db0 35 39 09 4d 61 78 69 6d 75 6d 20 63 6f 6d 70 72 |59.Maximum compr| 00001dc0 65 73 73 69 6f 6e 0a 0a 09 32 39 37 30 36 09 4e |ession...29706.N| 00001dd0 6f 20 64 65 63 69 6d 61 6c 20 6e 75 6d 62 65 72 |o decimal number| 00001de0 20 61 6e 61 6c 79 73 69 73 0a 0a 09 33 31 31 32 | analysis...3112| 00001df0 39 09 4e 6f 20 53 57 49 20 6e 61 6d 65 20 61 6e |9.No SWI name an| 00001e00 61 6c 79 73 69 73 0a 0a 09 33 35 31 30 33 09 4e |alysis...35103.N| 00001e10 6f 20 63 6f 6e 63 61 74 65 6e 61 74 69 6f 6e 20 |o concatenation | 00001e20 6f 66 20 6f 75 74 70 75 74 20 6c 69 6e 65 73 0a |of output lines.| 00001e30 0a 09 34 37 34 32 31 09 4e 6f 20 72 65 6d 6f 76 |..47421.No remov| 00001e40 61 6c 20 6f 66 20 75 6e 75 73 65 64 20 63 6f 64 |al of unused cod| 00001e50 65 0a 0a 09 35 31 39 35 30 09 4e 6f 20 72 65 64 |e...51950.No red| 00001e60 75 63 74 69 6f 6e 20 6f 66 20 6c 61 62 65 6c 73 |uction of labels| 00001e70 0a 0a 54 68 65 20 6c 61 74 65 72 20 6f 6e 65 73 |..The later ones| 00001e80 20 61 72 65 20 6e 6f 74 20 61 63 63 75 6d 75 6c | are not accumul| 00001e90 61 74 69 76 65 2c 20 74 68 65 20 6e 6f 6e 2d 72 |ative, the non-r| 00001ea0 65 64 75 63 74 69 6f 6e 20 6f 66 20 6c 61 62 65 |eduction of labe| 00001eb0 6c 73 20 28 6f 6e 6c 79 29 20 72 65 61 6c 6c 79 |ls (only) really| 00001ec0 20 64 6f 65 73 20 61 64 64 20 6f 6e 20 35 37 25 | does add on 57%| 00001ed0 20 74 6f 20 74 68 65 20 6f 75 74 70 75 74 20 70 | to the output p| 00001ee0 72 6f 67 72 61 6d 20 73 69 7a 65 21 0a 0a 0c 0a |rogram size!....| 00001ef0 0a 32 20 42 61 73 43 6f 6d 70 72 65 73 73 0a 0a |.2 BasCompress..| 00001f00 32 2e 31 20 4f 76 65 72 76 69 65 77 0a 0a 54 68 |2.1 Overview..Th| 00001f10 69 73 20 63 68 61 70 74 65 72 20 63 6f 6e 63 65 |is chapter conce| 00001f20 72 6e 73 20 69 74 73 65 6c 66 20 77 69 74 68 20 |rns itself with | 00001f30 42 61 73 69 63 2c 20 61 6e 64 20 77 68 61 74 20 |Basic, and what | 00001f40 42 61 73 43 6f 6d 70 72 65 73 73 20 65 78 70 65 |BasCompress expe| 00001f50 63 74 73 20 28 61 6e 64 20 64 6f 65 73 29 20 74 |cts (and does) t| 00001f60 6f 20 69 74 2e 0a 0a 32 2e 32 20 4a 61 72 67 6f |o it...2.2 Jargo| 00001f70 6e 0a 0a 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 |n..The following| 00001f80 20 74 65 72 6d 73 20 77 69 6c 6c 20 62 65 20 75 | terms will be u| 00001f90 73 65 64 20 71 75 69 74 65 20 66 72 65 71 75 65 |sed quite freque| 00001fa0 6e 74 6c 79 2c 20 73 6f 20 49 27 6c 6c 20 65 78 |ntly, so I'll ex| 00001fb0 70 6c 61 69 6e 20 77 68 61 74 20 69 73 20 6d 65 |plain what is me| 00001fc0 61 6e 74 20 62 79 20 74 68 65 6d 3a 0a 0a 09 72 |ant by them:...r| 00001fd0 6f 75 74 69 6e 65 09 61 20 70 72 6f 63 65 64 75 |outine.a procedu| 00001fe0 72 65 20 6f 72 20 66 75 6e 63 74 69 6f 6e 0a 0a |re or function..| 00001ff0 09 76 61 72 69 61 62 6c 65 09 61 6e 20 28 69 6e |.variable.an (in| 00002000 74 65 67 65 72 20 7c 20 72 65 61 6c 20 7c 20 73 |teger | real | s| 00002010 74 72 69 6e 67 29 5b 61 72 72 61 79 5d 0a 0a 09 |tring)[array]...| 00002020 6c 61 62 65 6c 09 09 74 68 65 20 6e 61 6d 65 20 |label..the name | 00002030 6f 66 20 61 20 72 6f 75 74 69 6e 65 20 6f 72 20 |of a routine or | 00002040 76 61 72 69 61 62 6c 65 0a 0a 09 6e 61 6d 65 09 |variable...name.| 00002050 61 20 6c 61 62 65 6c 20 77 69 74 68 20 69 74 73 |a label with its| 00002060 20 28 70 72 65 20 7c 20 70 6f 73 74 29 66 69 78 | (pre | post)fix| 00002070 0a 0a 0a 0a 45 2e 67 2e 20 74 68 65 20 66 6f 6c |....E.g. the fol| 00002080 6c 6f 77 69 6e 67 20 74 61 62 6c 65 20 6d 69 67 |lowing table mig| 00002090 68 74 20 68 65 6c 70 0a 0a 09 6e 61 6d 65 09 6c |ht help...name.l| 000020a0 61 62 65 6c 0a 0a 09 50 52 4f 43 5f 5a 61 70 70 |abel...PROC_Zapp| 000020b0 61 09 5f 5a 61 70 70 61 0a 0a 09 46 72 61 6e 6b |a._Zappa...Frank| 000020c0 25 09 46 72 61 6e 6b 0a 0a 09 43 79 24 28 29 09 |%.Frank...Cy$().| 000020d0 43 79 0a 0a 32 2e 33 20 42 61 73 69 63 0a 0a 42 |Cy..2.3 Basic..B| 000020e0 61 73 43 6f 6d 70 72 65 73 73 20 77 69 6c 6c 20 |asCompress will | 000020f0 6f 6e 6c 79 20 65 78 63 65 70 74 20 66 75 6c 6c |only except full| 00002100 79 20 74 6f 6b 65 6e 69 73 65 64 20 62 61 73 69 |y tokenised basi| 00002110 63 20 66 69 6c 65 73 2c 20 69 74 20 64 6f 65 73 |c files, it does| 00002120 20 6e 6f 74 20 61 63 63 65 70 74 20 74 65 78 74 | not accept text| 00002130 20 66 69 6c 65 73 2e 20 20 54 68 69 73 20 70 72 | files. This pr| 00002140 6f 67 72 61 6d 20 6f 6e 6c 79 20 6b 6e 6f 77 73 |ogram only knows| 00002150 20 61 62 6f 75 74 20 74 68 65 20 74 6f 6b 65 6e | about the token| 00002160 73 20 70 72 65 73 65 6e 74 20 69 6e 20 42 61 73 |s present in Bas| 00002170 69 63 20 56 2c 20 76 31 2e 30 34 2e 20 20 54 68 |ic V, v1.04. Th| 00002180 65 20 62 65 68 61 76 69 6f 75 72 20 6f 66 20 74 |e behaviour of t| 00002190 68 69 73 20 70 72 6f 67 72 61 6d 20 6f 6e 20 42 |his program on B| 000021a0 61 73 69 63 20 66 69 6c 65 73 20 6f 6e 20 61 20 |asic files on a | 000021b0 76 65 72 73 69 6f 6e 20 67 72 65 61 74 65 72 20 |version greater | 000021c0 74 68 61 6e 20 74 68 69 73 20 69 73 20 75 6e 64 |than this is und| 000021d0 65 66 69 6e 65 64 2e 0a 0a 4f 6e 6c 79 20 6f 6e |efined...Only on| 000021e0 65 20 42 61 73 69 63 20 66 69 6c 65 20 69 73 20 |e Basic file is | 000021f0 70 61 72 73 65 64 20 28 62 75 74 20 73 65 65 20 |parsed (but see | 00002200 a7 32 2e 31 30 29 2e 0a 0a 32 2e 34 20 4e 75 6d |.2.10)...2.4 Num| 00002210 62 65 72 73 0a 0a 42 61 73 43 6f 6d 70 72 65 73 |bers..BasCompres| 00002220 73 20 77 69 6c 6c 20 69 6e 74 65 72 70 72 65 74 |s will interpret| 00002230 20 61 6c 6c 20 6e 75 6d 62 65 72 73 20 61 6e 64 | all numbers and| 00002240 20 74 72 79 20 74 6f 20 6f 75 74 70 75 74 20 74 | try to output t| 00002250 68 65 6d 20 69 6e 20 61 73 20 63 6f 6d 70 61 63 |hem in as compac| 00002260 74 20 61 20 66 6f 72 6d 20 61 73 20 70 6f 73 73 |t a form as poss| 00002270 69 62 6c 65 2e 20 20 54 68 69 73 20 69 73 20 6d |ible. This is m| 00002280 6f 73 74 20 65 66 66 65 63 74 69 76 65 20 6f 6e |ost effective on| 00002290 20 6c 6f 6e 67 20 62 69 6e 61 72 79 20 6e 75 6d | long binary num| 000022a0 62 65 72 73 2c 20 62 75 74 20 63 61 6e 20 73 68 |bers, but can sh| 000022b0 6f 72 74 65 6e 20 6d 61 6e 79 20 6c 61 72 67 65 |orten many large| 000022c0 20 64 65 63 69 6d 61 6c 20 76 61 6c 75 65 73 20 | decimal values | 000022d0 61 73 20 77 65 6c 6c 2e 0a 0a 54 68 65 20 61 6e |as well...The an| 000022e0 61 6c 79 73 69 73 20 61 6e 64 20 6f 75 74 70 75 |alysis and outpu| 000022f0 74 20 6f 66 20 28 64 65 63 69 6d 61 6c 29 20 6e |t of (decimal) n| 00002300 75 6d 62 65 72 73 20 72 65 71 75 69 72 65 73 20 |umbers requires | 00002310 74 68 65 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 |the floating poi| 00002320 6e 74 20 65 6d 75 6c 61 74 6f 72 2e 20 20 46 6f |nt emulator. Fo| 00002330 72 20 74 68 69 73 20 72 65 61 73 6f 6e 20 74 68 |r this reason th| 00002340 69 73 20 63 61 6e 20 62 65 20 74 75 72 6e 65 64 |is can be turned| 00002350 20 6f 66 66 2c 20 6a 75 73 74 20 69 6e 20 63 61 | off, just in ca| 00002360 73 65 20 79 6f 75 20 61 72 65 20 76 65 72 79 20 |se you are very | 00002370 73 68 6f 72 74 20 6f 6e 20 6d 65 6d 6f 72 79 2e |short on memory.| 00002380 0a 0a 41 6e 61 6c 79 73 69 73 20 6f 66 20 68 65 |..Analysis of he| 00002390 78 61 64 65 63 69 6d 61 6c 20 61 6e 64 20 62 69 |xadecimal and bi| 000023a0 6e 61 72 79 20 6e 75 6d 62 65 72 73 20 69 73 20 |nary numbers is | 000023b0 61 6c 77 61 79 73 20 64 6f 6e 65 2c 20 61 73 20 |always done, as | 000023c0 74 68 69 73 20 64 6f 65 73 20 6e 6f 74 20 72 65 |this does not re| 000023d0 71 75 69 72 65 20 61 6e 79 20 66 6c 6f 61 74 69 |quire any floati| 000023e0 6e 67 20 70 6f 69 6e 74 20 6d 61 74 68 2e 0a 0a |ng point math...| 000023f0 32 2e 35 20 53 57 49 27 73 0a 0a 41 63 6f 72 6e |2.5 SWI's..Acorn| 00002400 27 73 20 69 6e 74 65 72 66 61 63 65 20 74 6f 20 |'s interface to | 00002410 74 68 65 20 6f 70 65 72 61 74 69 6e 67 20 73 79 |the operating sy| 00002420 73 74 65 6d 2c 20 74 68 65 20 53 57 49 20 69 73 |stem, the SWI is| 00002430 20 61 6e 20 65 6c 65 67 61 6e 74 20 73 65 6c 66 | an elegant self| 00002440 2d 64 6f 63 75 6d 65 6e 74 69 6e 67 20 73 79 73 |-documenting sys| 00002450 74 65 6d 2e 20 20 48 6f 77 65 76 65 72 2c 20 66 |tem. However, f| 00002460 6f 72 20 69 6e 74 65 72 70 72 65 74 65 64 20 6c |or interpreted l| 00002470 61 6e 67 75 61 67 65 73 20 6c 69 6b 65 20 42 61 |anguages like Ba| 00002480 73 69 63 2c 20 74 68 65 20 74 72 61 6e 73 6c 61 |sic, the transla| 00002490 74 69 6f 6e 20 6f 66 20 61 20 53 57 49 20 6e 61 |tion of a SWI na| 000024a0 6d 65 20 74 6f 20 61 20 53 57 49 20 6e 75 6d 62 |me to a SWI numb| 000024b0 65 72 20 69 73 20 72 65 6c 61 74 69 76 65 6c 79 |er is relatively| 000024c0 20 74 69 6d 65 2d 63 6f 6e 73 75 6d 69 6e 67 2e | time-consuming.| 000024d0 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 20 77 69 |..BasCompress wi| 000024e0 6c 6c 20 74 72 79 20 74 6f 20 64 6f 20 74 68 69 |ll try to do thi| 000024f0 73 20 74 72 61 6e 73 6c 61 74 69 6f 6e 2c 20 6c |s translation, l| 00002500 65 61 76 69 6e 67 20 6a 75 73 74 20 61 20 6e 75 |eaving just a nu| 00002510 6d 62 65 72 2e 20 20 54 68 69 73 20 70 72 6f 76 |mber. This prov| 00002520 69 64 65 73 20 62 6f 74 68 20 6c 61 72 67 65 20 |ides both large | 00002530 73 70 61 63 65 20 61 6e 64 20 6c 61 72 67 65 20 |space and large | 00002540 65 78 65 63 75 74 69 6f 6e 20 73 61 76 69 6e 67 |execution saving| 00002550 73 2c 20 70 61 72 74 69 63 75 6c 61 72 6c 79 20 |s, particularly | 00002560 66 6f 72 20 57 69 6d 70 20 70 72 6f 67 72 61 6d |for Wimp program| 00002570 73 20 74 68 61 74 20 75 73 65 20 53 57 49 27 73 |s that use SWI's| 00002580 20 64 75 72 69 6e 67 20 73 63 72 65 65 6e 20 72 | during screen r| 00002590 65 64 72 61 77 20 28 74 68 61 74 27 73 20 61 6c |edraw (that's al| 000025a0 6c 20 6f 66 20 74 68 65 6d 21 29 0a 0a 49 6e 20 |l of them!)..In | 000025b0 6f 72 64 65 72 20 66 6f 72 20 42 61 73 43 6f 6d |order for BasCom| 000025c0 70 72 65 73 73 20 74 6f 20 74 72 61 6e 73 6c 61 |press to transla| 000025d0 74 65 20 74 68 65 20 53 57 49 20 6e 61 6d 65 2c |te the SWI name,| 000025e0 20 69 74 20 6d 75 73 74 20 62 65 20 61 20 73 69 | it must be a si| 000025f0 6d 70 6c 65 20 63 6f 6e 73 74 61 6e 74 20 73 74 |mple constant st| 00002600 72 69 6e 67 20 65 78 70 72 65 73 73 69 6f 6e 2e |ring expression.| 00002610 20 20 49 66 20 69 74 20 69 73 6e 27 74 2c 20 6f | If it isn't, o| 00002620 72 20 69 74 20 63 61 6e 27 74 20 74 72 61 6e 73 |r it can't trans| 00002630 6c 61 74 65 20 69 74 2c 20 74 68 65 6e 20 69 74 |late it, then it| 00002640 20 69 73 20 6c 65 66 74 20 61 73 20 69 74 20 69 | is left as it i| 00002650 73 20 2d 20 74 68 75 73 20 70 72 6f 76 69 64 69 |s - thus providi| 00002660 6e 67 20 61 6e 20 28 61 6c 6d 6f 73 74 29 20 66 |ng an (almost) f| 00002670 6f 6f 6c 2d 70 72 6f 6f 66 20 63 6f 6e 76 65 72 |ool-proof conver| 00002680 73 69 6f 6e 2e 20 20 28 41 20 70 6f 73 73 69 62 |sion. (A possib| 00002690 6c 65 20 63 61 73 65 20 6f 66 20 61 20 63 6f 6d |le case of a com| 000026a0 70 6c 65 78 20 73 74 72 69 6e 67 20 63 6f 6e 73 |plex string cons| 000026b0 74 61 6e 74 20 77 6f 75 6c 64 20 62 65 20 53 59 |tant would be SY| 000026c0 53 20 22 58 22 2b 20 22 4f 53 5f 52 65 61 64 43 |S "X"+ "OS_ReadC| 000026d0 22 29 2e 0a 0a 42 6f 74 68 20 53 59 53 20 63 61 |")...Both SYS ca| 000026e0 6c 6c 73 20 28 69 6e 20 42 61 73 69 63 29 20 61 |lls (in Basic) a| 000026f0 6e 64 20 53 57 49 20 63 61 6c 6c 73 20 28 69 6e |nd SWI calls (in| 00002700 20 61 73 73 65 6d 62 6c 65 72 29 20 61 72 65 20 | assembler) are | 00002710 63 6f 6e 76 65 72 74 65 64 2e 0a 0a 4e 6f 74 65 |converted...Note| 00002720 20 61 6c 73 6f 20 74 68 61 74 20 74 68 65 20 61 | also that the a| 00002730 6e 79 20 6d 6f 64 75 6c 65 73 20 75 73 65 64 20 |ny modules used | 00002740 62 79 20 74 68 65 20 70 72 6f 67 72 61 6d 20 73 |by the program s| 00002750 68 6f 75 6c 64 20 62 65 20 72 65 73 69 64 65 6e |hould be residen| 00002760 74 20 61 74 20 74 68 65 20 74 69 6d 65 20 6f 66 |t at the time of| 00002770 20 63 6f 6d 70 72 65 73 73 69 6f 6e 2c 20 6f 74 | compression, ot| 00002780 68 65 72 77 69 73 65 20 74 68 65 20 53 57 49 27 |herwise the SWI'| 00002790 73 20 77 69 6c 6c 20 62 65 20 75 6e 6b 6e 6f 77 |s will be unknow| 000027a0 6e 20 61 6e 64 20 74 68 75 73 20 42 61 73 43 6f |n and thus BasCo| 000027b0 6d 70 72 65 73 73 20 77 69 6c 6c 20 6c 65 61 76 |mpress will leav| 000027c0 65 20 74 68 65 6d 20 61 73 20 73 74 72 69 6e 67 |e them as string| 000027d0 73 2e 20 20 54 68 69 73 20 69 73 20 61 6e 20 65 |s. This is an e| 000027e0 61 73 79 20 6d 69 73 74 61 6b 65 20 74 6f 20 6d |asy mistake to m| 000027f0 61 6b 65 2c 20 61 6e 64 20 72 65 73 75 6c 74 73 |ake, and results| 00002800 20 69 6e 20 73 6c 6f 77 65 72 20 61 6e 64 20 6c | in slower and l| 00002810 6f 6e 67 65 72 20 63 6f 6d 70 61 63 74 65 64 20 |onger compacted | 00002820 66 69 6c 65 73 20 62 65 69 6e 67 20 70 72 6f 64 |files being prod| 00002830 75 63 65 64 2e 20 20 54 68 69 73 20 63 61 73 65 |uced. This case| 00002840 73 20 75 64 20 64 65 74 65 63 74 65 64 2c 20 61 |s ud detected, a| 00002850 6e 64 20 67 65 6e 65 72 61 74 65 73 20 61 20 73 |nd generates a s| 00002860 75 69 74 61 62 6c 65 20 77 61 72 6e 69 6e 67 2e |uitable warning.| 00002870 0a 0a 32 2e 36 20 53 74 61 72 20 63 6f 6d 6d 61 |..2.6 Star comma| 00002880 6e 64 73 0a 0a 41 20 62 61 63 6b 77 61 72 64 20 |nds..A backward | 00002890 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 66 65 |compatibility fe| 000028a0 61 74 75 72 65 20 6f 66 20 42 61 73 69 63 20 56 |ature of Basic V| 000028b0 20 69 73 20 69 74 27 73 20 61 6c 6c 6f 77 61 6e | is it's allowan| 000028c0 63 65 20 6f 66 20 2a 43 6f 6d 6d 61 6e 64 73 20 |ce of *Commands | 000028d0 61 6e 79 77 68 65 72 65 20 69 6e 20 42 61 73 69 |anywhere in Basi| 000028e0 63 2e 20 20 4d 6f 64 65 72 6e 20 70 72 6f 67 72 |c. Modern progr| 000028f0 61 6d 73 20 73 68 6f 75 6c 64 20 72 65 61 6c 6c |ams should reall| 00002900 79 20 70 75 74 20 74 68 69 73 20 69 6e 20 61 6e |y put this in an| 00002910 20 4f 53 43 4c 49 28 22 2e 2e 2e 22 29 2c 20 6f | OSCLI("..."), o| 00002920 72 20 62 65 74 74 65 72 20 79 65 74 20 61 20 53 |r better yet a S| 00002930 59 53 20 22 4f 53 5f 43 4c 49 22 2c 20 22 2e 2e |YS "OS_CLI", "..| 00002940 2e 22 2e 0a 0a 48 6f 77 65 76 65 72 2c 20 73 69 |."...However, si| 00002950 6e 63 65 20 74 68 69 73 20 69 73 20 61 6c 6c 6f |nce this is allo| 00002960 77 65 64 2c 20 73 6f 6d 65 20 70 72 6f 67 72 61 |wed, some progra| 00002970 6d 6d 65 72 73 20 75 73 65 20 69 74 20 74 6f 20 |mmers use it to | 00002980 69 6e 74 72 6f 64 75 63 65 20 63 6f 6d 6d 65 6e |introduce commen| 00002990 74 73 20 69 6e 20 70 72 6f 67 72 61 6d 73 20 62 |ts in programs b| 000029a0 79 20 75 73 69 6e 67 20 74 68 65 20 2a 7c 20 63 |y using the *| c| 000029b0 6f 6d 6d 65 6e 74 20 63 6f 6e 73 74 72 75 63 74 |omment construct| 000029c0 2e 20 20 42 61 73 43 6f 6d 70 72 65 73 73 20 77 |. BasCompress w| 000029d0 69 6c 6c 20 72 65 6d 6f 76 65 20 74 68 65 73 65 |ill remove these| 000029e0 20 6c 69 6e 65 73 20 63 6f 6d 70 6c 65 74 65 6c | lines completel| 000029f0 79 2e 20 20 49 74 20 77 69 6c 6c 20 61 6c 73 6f |y. It will also| 00002a00 20 72 65 6d 6f 76 65 20 61 6c 6c 20 75 6e 6e 65 | remove all unne| 00002a10 63 65 73 73 61 72 79 20 2a 27 73 20 61 6e 64 20 |cessary *'s and | 00002a20 73 70 61 63 65 73 2e 0a 0a 49 66 20 74 68 69 73 |spaces...If this| 00002a30 20 72 65 73 75 6c 74 73 20 69 6e 20 61 20 63 6f | results in a co| 00002a40 6d 70 6c 65 74 65 20 72 65 6d 6f 76 61 6c 20 6f |mplete removal o| 00002a50 66 20 74 68 65 20 73 74 61 74 65 6d 65 6e 74 2c |f the statement,| 00002a60 20 42 61 73 43 6f 6d 70 72 65 73 73 20 6d 61 79 | BasCompress may| 00002a70 20 70 72 6f 64 75 63 65 20 69 6e 63 6f 72 72 65 | produce incorre| 00002a80 63 74 20 63 6f 64 65 20 69 66 20 28 61 6e 64 20 |ct code if (and | 00002a90 6f 6e 6c 79 20 69 66 29 20 74 68 69 73 20 2a 63 |only if) this *c| 00002aa0 6f 6d 6d 61 6e 64 20 77 61 73 20 6a 75 73 74 20 |ommand was just | 00002ab0 61 66 74 65 72 20 61 6e 20 28 65 78 70 6c 69 63 |after an (explic| 00002ac0 69 74 29 20 54 48 45 4e 2e 20 20 53 69 6e 63 65 |it) THEN. Since| 00002ad0 20 74 68 69 73 20 69 73 20 65 78 74 72 65 6d 65 | this is extreme| 00002ae0 6c 79 20 62 61 64 20 70 72 6f 67 72 61 6d 6d 69 |ly bad programmi| 00002af0 6e 67 20 70 72 61 63 74 69 73 65 64 2c 20 74 68 |ng practised, th| 00002b00 69 73 20 61 75 74 68 6f 72 20 66 65 6c 74 20 74 |is author felt t| 00002b10 68 65 20 62 65 6e 65 66 69 74 73 20 67 61 69 6e |he benefits gain| 00002b20 65 64 20 66 61 72 20 6f 75 74 77 65 69 67 68 20 |ed far outweigh | 00002b30 74 68 65 20 70 6f 73 73 69 62 6c 65 20 73 69 64 |the possible sid| 00002b40 65 2d 65 66 66 65 63 74 73 2e 0a 0a 32 2e 37 20 |e-effects...2.7 | 00002b50 41 73 73 65 6d 62 6c 65 72 0a 0a 42 61 73 43 6f |Assembler..BasCo| 00002b60 6d 70 72 65 73 73 20 66 75 6c 6c 79 20 75 6e 64 |mpress fully und| 00002b70 65 72 73 74 61 6e 64 73 20 61 6e 64 20 63 6f 6d |erstands and com| 00002b80 70 61 63 74 73 20 61 73 73 65 6d 62 6c 65 72 20 |pacts assembler | 00002b90 73 74 61 74 65 6d 65 6e 74 73 2e 20 20 41 73 20 |statements. As | 00002ba0 70 61 72 74 20 6f 66 20 74 68 69 73 20 70 72 6f |part of this pro| 00002bb0 63 65 73 73 2c 20 42 61 73 43 6f 6d 70 72 65 73 |cess, BasCompres| 00002bc0 73 20 61 6c 73 6f 20 63 68 65 63 6b 73 20 74 68 |s also checks th| 00002bd0 61 74 20 74 68 65 20 73 71 75 61 72 65 20 62 72 |at the square br| 00002be0 61 63 6b 65 74 20 94 5b 5d 95 20 63 6f 75 6e 74 |acket .[]. count| 00002bf0 20 6f 6e 20 65 61 63 68 20 73 74 61 74 65 6d 65 | on each stateme| 00002c00 6e 74 20 69 73 20 76 61 6c 69 64 20 2d 20 77 68 |nt is valid - wh| 00002c10 69 63 68 20 6d 61 79 20 62 65 20 75 73 65 66 75 |ich may be usefu| 00002c20 6c 20 66 6f 72 20 64 65 74 65 63 74 69 6e 67 20 |l for detecting | 00002c30 62 75 67 73 20 69 6e 20 63 6f 6e 64 69 74 69 6f |bugs in conditio| 00002c40 6e 61 6c 6c 79 20 61 73 73 65 6d 62 6c 65 64 20 |nally assembled | 00002c50 63 6f 64 65 2e 0a 0a 41 6c 6c 20 52 30 2e 2e 52 |code...All R0..R| 00002c60 31 35 20 72 65 67 69 73 74 65 72 73 20 67 65 74 |15 registers get| 00002c70 20 74 72 61 6e 73 6c 61 74 65 64 20 74 6f 20 30 | translated to 0| 00002c80 2e 2e 31 35 2c 20 74 68 69 73 20 73 61 76 65 73 |..15, this saves| 00002c90 20 61 20 6c 6f 74 20 6f 66 20 73 70 61 63 65 2e | a lot of space.| 00002ca0 20 20 41 6c 73 6f 20 74 68 65 20 69 6e 74 65 67 | Also the integ| 00002cb0 65 72 20 45 51 55 27 73 20 63 61 6e 20 62 65 20 |er EQU's can be | 00002cc0 72 65 6e 61 6d 65 64 20 74 6f 20 44 43 27 73 2e |renamed to DC's.| 00002cd0 0a 0a 4e 6f 74 65 20 74 68 61 74 20 74 68 65 20 |..Note that the | 00002ce0 73 69 6e 67 6c 65 20 73 70 61 63 65 20 6c 65 66 |single space lef| 00002cf0 74 20 61 66 74 65 72 20 73 6f 6d 65 20 6d 6e 65 |t after some mne| 00002d00 6d 6f 6e 69 63 73 20 69 73 20 6e 65 63 65 73 73 |monics is necess| 00002d10 61 72 79 2c 20 77 69 74 68 6f 75 74 20 69 74 20 |ary, without it | 00002d20 74 68 65 20 42 61 73 69 63 20 61 73 73 65 6d 62 |the Basic assemb| 00002d30 6c 65 72 20 77 69 6c 6c 20 72 65 66 75 73 65 20 |ler will refuse | 00002d40 74 6f 20 77 6f 72 6b 2e 0a 0a 32 2e 38 20 52 6f |to work...2.8 Ro| 00002d50 75 74 69 6e 65 73 0a 0a 49 74 20 69 73 20 69 6d |utines..It is im| 00002d60 70 6f 72 74 61 6e 74 20 74 6f 20 75 6e 64 65 72 |portant to under| 00002d70 73 74 61 6e 64 20 74 68 61 74 20 42 61 73 43 6f |stand that BasCo| 00002d80 6d 70 72 65 73 73 20 74 72 65 61 74 73 20 61 20 |mpress treats a | 00002d90 70 72 6f 67 72 61 6d 20 61 73 20 61 20 67 72 6f |program as a gro| 00002da0 75 70 20 6f 66 20 72 6f 75 74 69 6e 65 73 2e 20 |up of routines. | 00002db0 20 42 65 63 61 75 73 65 20 6f 66 20 74 68 69 73 | Because of this| 00002dc0 20 69 74 20 63 61 6e 20 72 65 6d 6f 76 65 20 61 | it can remove a| 00002dd0 6e 79 20 6a 75 6e 6b 20 69 6e 62 65 74 77 65 65 |ny junk inbetwee| 00002de0 6e 20 72 6f 75 74 69 6e 65 73 2c 20 69 2e 65 2e |n routines, i.e.| 00002df0 20 63 6f 6d 6d 65 6e 74 73 20 6e 6f 74 20 65 78 | comments not ex| 00002e00 70 6c 69 63 69 74 6c 79 20 73 74 61 72 74 69 6e |plicitly startin| 00002e10 67 20 77 69 74 68 20 61 20 52 45 4d 2c 20 74 68 |g with a REM, th| 00002e20 61 74 20 6f 74 68 65 72 20 73 71 75 61 73 68 65 |at other squashe| 00002e30 72 73 20 6c 65 61 76 65 20 62 65 68 69 6e 64 20 |rs leave behind | 00002e40 28 61 6e 64 20 65 76 65 6e 20 74 72 79 20 74 6f |(and even try to| 00002e50 20 61 6e 61 6c 79 73 65 20 2d 20 70 72 6f 64 75 | analyse - produ| 00002e60 63 69 6e 67 20 6d 61 6e 79 2c 20 6d 61 6e 79 20 |cing many, many | 00002e70 65 72 72 6f 72 73 29 2e 0a 0a 42 65 63 61 75 73 |errors)...Becaus| 00002e80 65 20 61 20 72 65 63 6f 72 64 20 69 73 20 6b 65 |e a record is ke| 00002e90 70 74 20 6f 66 20 77 68 61 74 20 68 61 70 70 65 |pt of what happe| 00002ea0 6e 73 20 69 6e 73 69 64 65 20 61 20 72 6f 75 74 |ns inside a rout| 00002eb0 69 6e 65 2c 20 69 74 20 69 73 20 70 6f 73 73 69 |ine, it is possi| 00002ec0 62 6c 65 20 74 6f 20 63 6f 6e 63 6c 75 64 65 20 |ble to conclude | 00002ed0 74 68 61 74 20 61 20 72 6f 75 74 69 6e 65 20 69 |that a routine i| 00002ee0 73 6e 27 74 20 61 63 74 75 61 6c 6c 79 20 6e 65 |sn't actually ne| 00002ef0 65 64 65 64 20 69 6e 20 74 68 65 20 6f 75 74 70 |eded in the outp| 00002f00 75 74 20 66 69 6c 65 20 2d 20 61 6e 64 20 73 6f |ut file - and so| 00002f10 20 6e 6f 6e 65 20 6f 66 20 74 68 65 20 72 6f 75 | none of the rou| 00002f20 74 69 6e 65 73 20 74 68 61 74 20 69 74 20 63 61 |tines that it ca| 00002f30 6c 6c 73 20 61 72 65 20 6e 65 65 64 65 64 20 74 |lls are needed t| 00002f40 68 61 74 20 62 69 74 20 6c 65 73 73 20 61 73 20 |hat bit less as | 00002f50 77 65 6c 6c 2e 20 20 54 68 75 73 20 42 61 73 43 |well. Thus BasC| 00002f60 6f 6d 70 72 65 73 73 20 63 61 6e 20 72 65 6d 6f |ompress can remo| 00002f70 76 65 20 41 4c 4c 20 75 6e 75 73 65 64 20 72 6f |ve ALL unused ro| 00002f80 75 74 69 6e 65 73 20 66 72 6f 6d 20 74 68 65 20 |utines from the | 00002f90 6f 75 74 70 75 74 20 66 69 6c 65 2e 20 20 54 68 |output file. Th| 00002fa0 69 73 20 69 73 20 61 20 76 65 72 79 20 70 6f 77 |is is a very pow| 00002fb0 65 72 66 75 6c 20 66 65 61 74 75 72 65 2e 0a 0a |erful feature...| 00002fc0 32 2e 38 2e 31 20 4d 61 69 6e 20 70 72 6f 67 72 |2.8.1 Main progr| 00002fd0 61 6d 0a 0a 42 61 73 69 63 56 20 64 6f 65 73 20 |am..BasicV does | 00002fe0 6e 6f 74 20 70 72 6f 76 69 64 65 20 61 20 63 6c |not provide a cl| 00002ff0 65 61 72 6c 79 20 64 65 66 69 6e 65 64 20 6d 65 |early defined me| 00003000 74 68 6f 64 20 66 6f 72 20 64 69 73 74 69 6e 67 |thod for disting| 00003010 75 69 73 68 69 6e 67 20 74 68 65 20 65 6e 64 20 |uishing the end | 00003020 6f 66 20 74 68 65 20 6d 61 69 6e 20 70 72 6f 67 |of the main prog| 00003030 72 61 6d 2c 20 61 6e 64 20 74 68 65 20 73 74 61 |ram, and the sta| 00003040 72 74 20 6f 66 20 74 68 65 20 73 75 62 72 6f 75 |rt of the subrou| 00003050 74 69 6e 65 73 2e 20 20 42 61 73 43 6f 6d 70 72 |tines. BasCompr| 00003060 65 73 73 20 74 72 65 61 74 73 20 65 76 65 72 79 |ess treats every| 00003070 74 68 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 73 |thing from the s| 00003080 74 61 72 74 20 6f 66 20 74 68 65 20 66 69 72 73 |tart of the firs| 00003090 74 20 66 69 6c 65 20 74 6f 20 74 68 65 20 66 69 |t file to the fi| 000030a0 72 73 74 20 72 6f 75 74 69 6e 65 20 64 65 66 69 |rst routine defi| 000030b0 6e 69 74 69 6f 6e 20 28 44 45 46 20 50 52 4f 43 |nition (DEF PROC| 000030c0 20 6f 72 20 44 45 46 20 46 4e 29 20 74 6f 20 62 | or DEF FN) to b| 000030d0 65 20 74 68 65 20 6d 61 69 6e 20 70 72 6f 67 72 |e the main progr| 000030e0 61 6d 2e 20 20 54 68 69 73 20 69 73 6e 27 74 20 |am. This isn't | 000030f0 69 64 65 61 6c 2c 20 61 73 20 6d 61 6e 79 20 6d |ideal, as many m| 00003100 61 69 6e 20 70 72 6f 67 72 61 6d 73 20 63 6f 6e |ain programs con| 00003110 73 69 73 74 73 20 6f 66 20 61 6e 20 69 6e 66 69 |sists of an infi| 00003120 6e 69 74 65 20 6c 6f 6f 70 20 66 6f 6c 6c 6f 77 |nite loop follow| 00003130 65 64 20 62 79 20 6a 75 6e 6b 20 2d 20 68 6f 77 |ed by junk - how| 00003140 65 76 65 72 20 74 68 65 72 65 20 69 73 20 6e 6f |ever there is no| 00003150 20 65 61 73 79 20 77 61 79 20 6f 66 20 72 65 63 | easy way of rec| 00003160 6f 67 6e 69 73 69 6e 67 20 74 68 65 20 74 72 75 |ognising the tru| 00003170 65 20 65 6e 64 20 6f 66 20 74 68 65 20 6d 61 69 |e end of the mai| 00003180 6e 20 70 72 6f 67 72 61 6d 2c 20 73 6f 20 79 6f |n program, so yo| 00003190 75 20 68 61 76 65 20 74 6f 20 6c 69 76 65 20 77 |u have to live w| 000031a0 69 74 68 20 69 74 20 61 73 20 69 74 20 69 73 2e |ith it as it is.| 000031b0 0a 0a 49 66 20 79 6f 75 20 77 69 73 68 20 74 6f |..If you wish to| 000031c0 20 63 6f 6d 70 72 65 73 73 20 6c 69 62 72 61 72 | compress librar| 000031d0 79 20 66 69 6c 65 73 20 73 65 70 61 72 61 74 65 |y files separate| 000031e0 6c 79 2c 20 69 2e 65 2e 20 66 69 6c 65 73 20 74 |ly, i.e. files t| 000031f0 68 61 74 20 64 6f 20 6e 6f 74 20 63 6f 6e 74 61 |hat do not conta| 00003200 69 6e 20 61 20 6d 61 69 6e 20 72 6f 75 74 69 6e |in a main routin| 00003210 65 20 61 74 20 74 68 65 20 73 74 61 72 74 20 6f |e at the start o| 00003220 66 20 61 20 66 69 6c 65 2c 20 74 68 65 6e 20 74 |f a file, then t| 00003230 68 69 73 20 69 73 20 65 61 73 69 6c 79 20 61 63 |his is easily ac| 00003240 63 6f 6d 6d 6f 64 61 74 65 64 2e 0a 0a 32 2e 38 |commodated...2.8| 00003250 2e 32 20 53 74 61 72 74 20 61 6e 64 20 65 6e 64 |.2 Start and end| 00003260 0a 0a 54 68 65 20 73 74 61 72 74 20 6f 66 20 61 |..The start of a| 00003270 20 42 61 73 69 63 20 72 6f 75 74 69 6e 65 20 69 | Basic routine i| 00003280 73 20 76 65 72 79 20 65 61 73 69 6c 79 20 64 65 |s very easily de| 00003290 74 65 63 74 65 64 2c 20 69 74 20 69 73 20 61 20 |tected, it is a | 000032a0 6c 69 6e 65 20 74 68 61 74 20 73 74 61 72 74 73 |line that starts| 000032b0 20 77 69 74 68 20 44 45 46 a0 46 4e 20 6f 72 20 | with DEF.FN or | 000032c0 44 45 46 a0 50 52 4f 43 2e 0a 0a 48 6f 77 65 76 |DEF.PROC...Howev| 000032d0 65 72 2c 20 74 68 65 20 65 6e 64 20 6f 66 20 61 |er, the end of a| 000032e0 20 72 6f 75 74 69 6e 65 20 69 73 6e 27 74 20 73 | routine isn't s| 000032f0 6f 20 65 61 73 79 20 74 6f 20 64 65 74 65 63 74 |o easy to detect| 00003300 2e 20 20 49 6e 20 74 68 65 20 69 64 65 61 6c 20 |. In the ideal | 00003310 77 6f 72 6c 64 2c 20 65 76 65 72 79 20 72 6f 75 |world, every rou| 00003320 74 69 6e 65 20 77 69 6c 6c 20 68 61 76 65 20 6f |tine will have o| 00003330 6e 65 2c 20 61 6e 64 20 6f 6e 6c 79 20 6f 6e 65 |ne, and only one| 00003340 20 65 78 69 74 20 74 68 61 74 20 69 73 20 61 20 | exit that is a | 00003350 73 69 6d 70 6c 65 20 45 4e 44 50 52 4f 43 2c 20 |simple ENDPROC, | 00003360 6f 72 20 3d 20 3c 65 78 70 72 3e 20 6f 6e 20 61 |or = <expr> on a| 00003370 20 6c 69 6e 65 20 6f 66 20 69 74 73 27 20 6f 77 | line of its' ow| 00003380 6e 2e 20 20 48 6f 77 65 76 65 72 2c 20 77 65 20 |n. However, we | 00003390 61 6c 6c 20 6c 69 76 65 20 69 6e 20 74 68 65 20 |all live in the | 000033a0 72 65 61 6c 20 77 6f 72 6c 64 2c 20 61 6e 64 20 |real world, and | 000033b0 74 68 69 6e 67 73 20 61 72 65 20 6d 6f 72 65 20 |things are more | 000033c0 63 6f 6d 70 6c 69 63 61 74 65 64 20 74 68 61 6e |complicated than| 000033d0 20 74 68 61 74 2e 0a 0a 32 2e 38 2e 33 20 43 6f | that...2.8.3 Co| 000033e0 6e 64 69 74 69 6f 6e 61 6c 20 72 6f 75 74 69 6e |nditional routin| 000033f0 65 20 65 6e 64 0a 0a 46 6f 72 20 65 78 61 6d 70 |e end..For examp| 00003400 6c 65 2c 20 63 6f 6e 73 69 64 65 72 20 74 68 65 |le, consider the| 00003410 20 66 6f 6c 6c 6f 77 69 6e 67 20 66 75 6e 63 74 | following funct| 00003420 69 6f 6e 3a 0a 0a 09 44 45 46 20 46 4e 6d 69 6e |ion:...DEF FNmin| 00003430 28 61 2c 20 62 29 0a 0a 09 20 20 49 46 20 61 3e |(a, b)... IF a>| 00003440 62 20 54 48 45 4e 20 3d 62 20 45 4c 53 45 20 3d |b THEN =b ELSE =| 00003450 61 0a 0a 4e 6f 77 2c 20 74 68 65 20 6f 6e 6c 79 |a..Now, the only| 00003460 20 77 61 79 20 66 6f 72 20 42 61 73 43 6f 6d 70 | way for BasComp| 00003470 72 65 73 73 20 74 6f 20 72 65 63 6f 67 6e 69 73 |ress to recognis| 00003480 65 20 74 68 69 73 20 63 6f 6e 73 74 72 75 63 74 |e this construct| 00003490 20 69 73 20 69 66 20 69 74 20 6b 65 70 74 20 74 | is if it kept t| 000034a0 72 61 63 6b 20 6f 66 20 61 6c 6c 20 62 72 61 6e |rack of all bran| 000034b0 63 68 65 73 20 6f 66 20 61 20 63 6f 6e 64 69 74 |ches of a condit| 000034c0 69 6f 6e 61 6c 2e 20 20 54 68 69 73 20 77 6f 75 |ional. This wou| 000034d0 6c 64 20 69 6e 76 6f 6c 76 65 20 61 20 6d 61 6a |ld involve a maj| 000034e0 6f 72 20 75 70 67 72 61 64 65 2c 20 61 6e 64 20 |or upgrade, and | 000034f0 77 6f 75 6c 64 20 6d 61 6b 65 20 74 68 65 20 70 |would make the p| 00003500 72 6f 67 72 61 6d 20 6a 75 73 74 20 61 20 63 6f |rogram just a co| 00003510 64 65 2d 67 65 6e 65 72 61 74 69 6f 6e 20 70 61 |de-generation pa| 00003520 73 73 20 61 77 61 79 20 66 72 6f 6d 20 61 20 74 |ss away from a t| 00003530 72 75 65 20 63 6f 6d 70 69 6c 65 72 2e 0a 0a 53 |rue compiler...S| 00003540 6f 20 77 68 61 74 20 42 61 73 43 6f 6d 70 72 65 |o what BasCompre| 00003550 73 73 20 64 6f 65 73 20 69 73 20 74 6f 20 69 67 |ss does is to ig| 00003560 6e 6f 72 65 20 65 78 69 74 73 20 66 72 6f 6d 20 |nore exits from | 00003570 61 20 72 6f 75 74 69 6e 65 20 74 68 61 74 20 6f |a routine that o| 00003580 63 63 75 72 20 6f 6e 20 74 68 65 20 73 61 6d 65 |ccur on the same| 00003590 20 6c 69 6e 65 20 61 73 20 61 6e 20 49 46 2e 0a | line as an IF..| 000035a0 0a 42 75 74 2c 20 69 6e 20 74 68 65 20 61 62 6f |.But, in the abo| 000035b0 76 65 20 65 78 61 6d 70 6c 65 2c 20 74 68 65 20 |ve example, the | 000035c0 6e 65 78 74 20 6c 69 6e 65 20 77 69 6c 6c 20 62 |next line will b| 000035d0 65 20 74 68 6f 75 67 68 74 20 74 6f 20 62 65 20 |e thought to be | 000035e0 69 6e 73 69 64 65 20 74 68 65 20 66 75 6e 63 74 |inside the funct| 000035f0 69 6f 6e 20 6d 69 6e 2e 20 20 54 68 69 73 20 75 |ion min. This u| 00003600 73 75 61 6c 6c 79 20 72 65 73 75 6c 74 73 20 69 |sually results i| 00003610 6e 20 61 20 63 61 73 63 61 64 65 20 6f 66 20 77 |n a cascade of w| 00003620 61 72 6e 69 6e 67 2f 65 72 72 6f 72 20 6d 65 73 |arning/error mes| 00003630 73 61 67 65 73 20 62 65 69 6e 67 20 67 65 6e 65 |sages being gene| 00003640 72 61 74 65 64 2e 20 20 54 68 65 20 6f 6e 6c 79 |rated. The only| 00003650 20 63 75 72 65 20 66 6f 72 20 69 74 20 69 73 20 | cure for it is | 00003660 74 6f 20 61 6d 65 6e 64 20 74 68 65 20 6f 66 66 |to amend the off| 00003670 65 6e 64 69 6e 67 20 66 75 6e 63 74 69 6f 6e 2e |ending function.| 00003680 20 20 54 68 65 20 73 69 6d 70 6c 65 73 74 20 77 | The simplest w| 00003690 61 79 20 69 73 20 74 6f 20 6a 75 73 74 20 70 75 |ay is to just pu| 000036a0 74 20 61 20 64 75 6d 6d 79 20 74 65 72 6d 69 6e |t a dummy termin| 000036b0 61 74 6f 72 20 69 6e 2c 20 65 2e 67 2e 0a 0a 09 |ator in, e.g....| 000036c0 44 45 46 20 46 4e 6d 69 6e 28 61 2c 20 62 29 0a |DEF FNmin(a, b).| 000036d0 0a 09 20 20 49 46 20 61 3e 62 20 54 48 45 4e 20 |.. IF a>b THEN | 000036e0 3d 62 20 45 4c 53 45 20 3d 61 0a 0a 09 3d 20 30 |=b ELSE =a...= 0| 000036f0 0a 0a 42 65 74 74 65 72 20 79 65 74 2c 20 77 6f |..Better yet, wo| 00003700 75 6c 64 20 62 65 20 74 6f 20 63 6f 64 65 20 69 |uld be to code i| 00003710 74 20 94 70 72 6f 70 65 72 6c 79 95 3a 0a 0a 09 |t .properly.:...| 00003720 44 45 46 20 46 4e 6d 69 6e 28 61 2c 20 62 29 0a |DEF FNmin(a, b).| 00003730 0a 09 20 20 49 46 20 61 3e 62 20 54 48 45 4e 20 |.. IF a>b THEN | 00003740 61 3d 62 0a 0a 09 3d 20 61 0a 0a 0a 0a 54 68 65 |a=b...= a....The| 00003750 72 65 20 69 73 20 61 6c 73 6f 20 74 68 65 20 70 |re is also the p| 00003760 72 6f 62 6c 65 6d 20 6f 66 20 70 72 6f 67 72 61 |roblem of progra| 00003770 6d 73 20 74 68 61 74 20 70 72 65 6d 61 74 75 72 |ms that prematur| 00003780 65 6c 79 20 74 65 72 6d 69 6e 61 74 65 20 72 6f |ely terminate ro| 00003790 75 74 69 6e 65 73 20 69 6e 73 69 64 65 2c 20 73 |utines inside, s| 000037a0 61 79 2c 20 61 20 63 61 73 65 20 73 74 72 75 63 |ay, a case struc| 000037b0 74 75 72 65 2e 20 20 54 68 69 73 20 68 61 70 70 |ture. This happ| 000037c0 65 6e 73 20 71 75 69 74 65 20 6f 66 74 65 6e 2c |ens quite often,| 000037d0 20 62 65 63 61 75 73 65 20 69 74 20 6d 61 6b 65 | because it make| 000037e0 73 20 66 6f 72 20 6d 75 63 68 20 73 68 6f 72 74 |s for much short| 000037f0 65 72 20 63 6f 64 65 2c 20 61 6e 64 20 73 6f 20 |er code, and so | 00003800 42 61 73 43 6f 6d 70 72 65 73 73 20 72 65 63 6f |BasCompress reco| 00003810 67 6e 69 73 65 73 20 74 68 69 73 2c 20 73 65 65 |gnises this, see| 00003820 20 a7 32 2e 39 2e 0a 0a 32 2e 38 2e 34 20 45 4e | .2.9...2.8.4 EN| 00003830 44 20 61 6e 64 20 45 52 52 4f 52 0a 0a 43 75 72 |D and ERROR..Cur| 00003840 72 65 6e 74 6c 79 20 42 61 73 43 6f 6d 70 72 65 |rently BasCompre| 00003850 73 73 20 64 6f 65 73 20 6e 6f 74 20 72 65 63 6f |ss does not reco| 00003860 67 6e 69 73 65 20 74 68 65 20 66 61 63 74 20 74 |gnise the fact t| 00003870 68 61 74 20 61 20 72 6f 75 74 69 6e 65 20 6d 61 |hat a routine ma| 00003880 79 20 65 6e 64 20 77 69 74 68 20 74 68 65 20 45 |y end with the E| 00003890 4e 44 20 63 6f 6d 6d 61 6e 64 2c 20 6e 6f 72 20 |ND command, nor | 000038a0 61 6e 20 75 6e 63 6f 6e 64 69 74 69 6f 6e 61 6c |an unconditional| 000038b0 20 45 52 52 4f 52 2e 20 20 53 69 6e 63 65 20 74 | ERROR. Since t| 000038c0 68 65 73 65 20 61 72 65 20 65 78 61 6d 70 6c 65 |hese are example| 000038d0 73 20 6f 66 20 62 61 64 2d 70 72 6f 67 72 61 6d |s of bad-program| 000038e0 6d 69 6e 67 20 61 6e 79 77 61 79 2c 20 74 68 65 |ming anyway, the| 000038f0 73 65 20 61 72 65 20 65 61 73 69 6c 79 20 77 6f |se are easily wo| 00003900 72 6b 65 64 20 61 72 6f 75 6e 64 20 62 79 20 6a |rked around by j| 00003910 75 73 74 20 61 64 64 69 6e 67 20 61 20 72 65 64 |ust adding a red| 00003920 75 6e 64 61 6e 74 20 45 4e 44 50 52 4f 43 20 6f |undant ENDPROC o| 00003930 72 20 3d 30 20 61 66 74 65 72 77 61 72 64 73 2e |r =0 afterwards.| 00003940 0a 0a 32 2e 38 2e 35 20 4c 4f 43 41 4c 20 45 52 |..2.8.5 LOCAL ER| 00003950 52 4f 52 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 |ROR..BasCompress| 00003960 20 66 75 6c 6c 79 20 72 65 63 6f 67 6e 69 73 65 | fully recognise| 00003970 73 20 6c 6f 63 61 6c 20 65 72 72 6f 72 20 68 61 |s local error ha| 00003980 6e 64 6c 65 72 73 2c 20 61 6e 64 20 77 69 6c 6c |ndlers, and will| 00003990 20 66 6f 72 63 65 20 74 68 65 20 6e 65 78 74 20 | force the next | 000039a0 69 6e 70 75 74 20 6c 69 6e 65 20 74 6f 20 73 74 |input line to st| 000039b0 61 72 74 20 61 20 6e 65 77 20 6f 75 74 70 75 74 |art a new output| 000039c0 20 6c 69 6e 65 20 61 63 63 6f 72 64 69 6e 67 6c | line accordingl| 000039d0 79 2e 0a 0a 32 2e 39 20 4d 75 6c 74 69 2d 6c 69 |y...2.9 Multi-li| 000039e0 6e 65 20 73 74 72 75 63 74 75 72 65 73 0a 0a 42 |ne structures..B| 000039f0 61 73 43 6f 6d 70 72 65 73 73 20 6b 65 65 70 73 |asCompress keeps| 00003a00 20 74 72 61 63 6b 20 6f 66 20 74 68 65 20 63 75 | track of the cu| 00003a10 72 72 65 6e 74 20 6e 65 73 74 69 6e 67 20 6c 65 |rrent nesting le| 00003a20 76 65 6c 20 6f 66 20 61 6c 6c 20 6d 75 6c 74 69 |vel of all multi| 00003a30 2d 6c 69 6e 65 20 73 74 72 75 63 74 75 72 65 73 |-line structures| 00003a40 3a 0a 0a 09 8f 09 43 41 53 45 20 2e 2e 2e 20 45 |:.....CASE ... E| 00003a50 4e 44 43 41 53 45 0a 0a 09 8f 09 49 46 20 54 48 |NDCASE.....IF TH| 00003a60 45 4e 20 2e 2e 2e 20 45 4e 44 49 46 0a 0a 09 8f |EN ... ENDIF....| 00003a70 09 52 45 50 45 41 54 20 2e 2e 2e 20 55 4e 54 49 |.REPEAT ... UNTI| 00003a80 4c 0a 0a 09 8f 09 57 48 49 4c 45 20 2e 2e 2e 20 |L.....WHILE ... | 00003a90 45 4e 44 57 48 49 4c 45 0a 0a 49 74 20 64 6f 65 |ENDWHILE..It doe| 00003aa0 73 20 74 68 69 73 20 70 72 69 6d 61 72 69 6c 79 |s this primarily| 00003ab0 20 74 6f 20 64 65 74 65 63 74 20 63 6f 6e 64 69 | to detect condi| 00003ac0 74 69 6f 6e 61 6c 20 65 78 69 74 69 6e 67 20 66 |tional exiting f| 00003ad0 72 6f 6d 20 61 20 72 6f 75 74 69 6e 65 2e 20 20 |rom a routine. | 00003ae0 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 |For example, if | 00003af0 61 6e 20 45 4e 44 50 52 4f 43 20 6f 72 20 3d 20 |an ENDPROC or = | 00003b00 3c 65 78 70 72 3e 20 69 73 20 64 65 74 65 63 74 |<expr> is detect| 00003b10 65 64 20 69 6e 73 69 64 65 20 73 75 63 68 20 61 |ed inside such a| 00003b20 20 73 74 72 75 63 74 75 72 65 2c 20 74 68 65 6e | structure, then| 00003b30 20 42 61 73 43 6f 6d 70 72 65 73 73 20 6b 6e 6f | BasCompress kno| 00003b40 77 73 20 69 74 20 69 73 6e 27 74 20 74 68 65 20 |ws it isn't the | 00003b50 74 72 75 65 20 65 6e 64 20 6f 66 20 74 68 65 20 |true end of the | 00003b60 72 6f 75 74 69 6e 65 2c 20 61 6e 64 20 73 6f 20 |routine, and so | 00003b70 77 69 6c 6c 20 69 67 6e 6f 72 65 20 69 74 2e 20 |will ignore it. | 00003b80 20 41 20 76 65 72 79 20 75 73 65 66 75 6c 20 73 | A very useful s| 00003b90 69 64 65 2d 65 66 66 65 63 74 20 6f 66 20 74 68 |ide-effect of th| 00003ba0 69 73 20 69 73 20 74 68 61 74 20 42 61 73 43 6f |is is that BasCo| 00003bb0 6d 70 72 65 73 73 20 64 65 74 65 63 74 73 20 70 |mpress detects p| 00003bc0 72 6f 67 72 61 6d 6d 69 6e 67 20 65 72 72 6f 72 |rogramming error| 00003bd0 73 20 69 6e 20 74 68 65 20 75 73 65 20 6f 66 20 |s in the use of | 00003be0 74 68 65 73 65 20 63 6f 6e 73 74 72 75 63 74 73 |these constructs| 00003bf0 2c 20 65 72 72 6f 72 73 20 74 68 61 74 20 74 68 |, errors that th| 00003c00 65 20 72 75 6e 20 74 69 6d 65 20 42 61 73 69 63 |e run time Basic| 00003c10 20 69 6e 74 65 72 70 72 65 74 65 72 20 61 6c 6c | interpreter all| 00003c20 6f 77 73 20 74 68 72 6f 75 67 68 2e 20 20 54 68 |ows through. Th| 00003c30 65 73 65 20 76 65 72 79 20 6f 66 74 65 6e 20 61 |ese very often a| 00003c40 72 65 20 67 65 6e 75 69 6e 65 20 70 72 6f 67 72 |re genuine progr| 00003c50 61 6d 20 6d 69 73 74 61 6b 65 73 2c 20 75 73 75 |am mistakes, usu| 00003c60 61 6c 6c 79 20 69 6e 73 69 64 65 20 65 72 72 6f |ally inside erro| 00003c70 72 2d 68 61 6e 64 6c 69 6e 67 20 63 6f 64 65 20 |r-handling code | 00003c80 74 68 61 74 20 69 73 20 6e 6f 74 20 66 75 6c 6c |that is not full| 00003c90 79 20 64 65 62 75 67 67 65 64 2e 0a 0a 48 6f 77 |y debugged...How| 00003ca0 65 76 65 72 2c 20 74 68 65 72 65 20 61 72 65 20 |ever, there are | 00003cb0 74 77 6f 20 63 61 76 65 61 74 73 20 74 6f 20 74 |two caveats to t| 00003cc0 68 69 73 2e 20 20 46 69 72 73 74 6c 79 2c 20 69 |his. Firstly, i| 00003cd0 6e 20 6f 72 64 65 72 20 66 6f 72 20 42 61 73 43 |n order for BasC| 00003ce0 6f 6d 70 72 65 73 73 20 74 6f 20 64 6f 20 74 68 |ompress to do th| 00003cf0 69 73 20 69 74 20 6d 75 73 74 20 61 73 73 75 6d |is it must assum| 00003d00 65 20 74 68 61 74 20 74 68 65 20 73 74 61 72 74 |e that the start| 00003d10 20 6f 66 20 61 6e 79 20 6d 75 6c 74 69 2d 6c 69 | of any multi-li| 00003d20 6e 65 20 73 74 72 75 63 74 75 72 65 20 69 73 20 |ne structure is | 00003d30 6e 6f 74 20 69 6e 73 69 64 65 20 61 20 6f 6e 65 |not inside a one| 00003d40 2d 6c 69 6e 65 20 49 46 20 63 6f 6e 73 74 72 75 |-line IF constru| 00003d50 63 74 2e 20 20 55 6e 66 6f 72 74 75 6e 61 74 65 |ct. Unfortunate| 00003d60 6c 79 2c 20 73 6f 6d 65 20 70 72 6f 67 72 61 6d |ly, some program| 00003d70 6d 65 72 73 20 70 75 74 20 61 20 71 75 69 63 6b |mers put a quick| 00003d80 20 57 48 49 4c 45 20 2e 2e 2e 20 45 4e 44 57 48 | WHILE ... ENDWH| 00003d90 49 4c 45 20 6c 6f 6f 70 20 69 6e 20 61 20 6f 6e |ILE loop in a on| 00003da0 65 2d 6c 69 6e 65 20 49 46 2e 20 20 42 61 73 43 |e-line IF. BasC| 00003db0 6f 6d 70 72 65 73 73 20 64 6f 65 73 20 6e 6f 74 |ompress does not| 00003dc0 20 68 61 6e 64 6c 65 20 74 68 69 73 20 63 6f 72 | handle this cor| 00003dd0 72 65 63 74 6c 79 20 61 6e 64 20 74 68 69 73 20 |rectly and this | 00003de0 6c 69 6e 65 20 6e 65 65 64 73 20 74 6f 20 62 65 |line needs to be| 00003df0 20 73 70 6c 69 74 20 69 6e 74 6f 20 61 20 74 72 | split into a tr| 00003e00 75 65 20 6d 75 6c 74 69 2d 6c 69 6e 65 20 49 46 |ue multi-line IF| 00003e10 2e 0a 0a 53 65 63 6f 6e 64 6c 79 2c 20 61 6e 64 |...Secondly, and| 00003e20 20 6a 75 73 74 20 61 73 20 6c 65 73 73 20 73 65 | just as less se| 00003e30 72 69 6f 75 73 6c 79 2c 20 42 61 73 69 63 56 20 |riously, BasicV | 00003e40 69 73 20 72 61 74 68 65 72 20 6c 61 78 20 69 6e |is rather lax in| 00003e50 20 69 74 27 73 20 61 74 74 69 74 75 64 65 20 74 | it's attitude t| 00003e60 6f 77 61 72 64 73 20 6d 75 6c 74 69 2d 6c 69 6e |owards multi-lin| 00003e70 65 20 73 74 72 75 63 74 75 72 65 73 2e 20 20 46 |e structures. F| 00003e80 6f 72 20 65 78 61 6d 70 6c 65 3a 0a 0a 09 52 45 |or example:...RE| 00003e90 50 45 41 54 0a 0a 09 20 20 69 20 2b 3d 20 31 0a |PEAT... i += 1.| 00003ea0 0a 09 20 20 43 41 53 45 20 78 28 69 29 20 4f 46 |.. CASE x(i) OF| 00003eb0 0a 0a 09 20 20 57 48 45 4e 20 31 3a 0a 0a 09 20 |... WHEN 1:... | 00003ec0 20 20 20 49 46 20 64 6f 5f 69 74 20 54 48 45 4e | IF do_it THEN| 00003ed0 0a 0a 09 20 20 20 20 20 20 55 4e 54 49 4c 20 46 |... UNTIL F| 00003ee0 41 4c 53 45 3a 45 4e 44 50 52 4f 43 0a 0a 09 20 |ALSE:ENDPROC... | 00003ef0 20 20 20 45 4e 44 49 46 0a 0a 09 20 20 20 20 2e | ENDIF... .| 00003f00 2e 2e 0a 0a 09 20 20 2e 2e 2e 0a 0a 09 20 20 45 |..... ...... E| 00003f10 4e 44 43 41 53 45 0a 0a 09 55 4e 54 49 4c 20 69 |NDCASE...UNTIL i| 00003f20 3e 6d 61 78 5f 69 0a 0a 48 65 72 65 2c 20 42 61 |>max_i..Here, Ba| 00003f30 73 69 63 56 20 77 69 6c 6c 20 72 61 74 68 65 72 |sicV will rather| 00003f40 20 63 61 72 65 6c 65 73 73 6c 79 20 65 78 65 63 | carelessly exec| 00003f50 75 74 65 20 74 68 65 20 55 4e 54 49 4c 2c 20 65 |ute the UNTIL, e| 00003f60 76 65 6e 20 74 68 6f 75 67 68 20 69 74 20 69 73 |ven though it is| 00003f70 6e 27 74 20 61 74 20 74 68 65 20 73 61 6d 65 20 |n't at the same | 00003f80 6e 65 73 74 69 6e 67 20 6c 65 76 65 6c 20 61 73 |nesting level as| 00003f90 20 74 68 65 20 6d 61 74 63 68 69 6e 67 20 52 45 | the matching RE| 00003fa0 50 45 41 54 2e 20 20 42 61 73 43 6f 6d 70 72 65 |PEAT. BasCompre| 00003fb0 73 73 20 69 73 20 6e 6f 74 20 73 6f 20 6c 65 6e |ss is not so len| 00003fc0 69 65 6e 74 20 61 6e 64 20 69 74 20 77 69 6c 6c |ient and it will| 00003fd0 20 72 65 66 75 73 65 20 70 6f 69 6e 74 20 62 6c | refuse point bl| 00003fe0 61 6e 6b 20 74 6f 20 68 61 6e 64 6c 65 20 73 75 |ank to handle su| 00003ff0 63 68 20 63 6f 64 65 2e 20 20 49 74 20 69 73 20 |ch code. It is | 00004000 61 6e 6f 74 68 65 72 20 65 78 61 6d 70 6c 65 20 |another example | 00004010 6f 66 20 62 61 64 20 70 72 6f 67 72 61 6d 6d 69 |of bad programmi| 00004020 6e 67 20 62 65 69 6e 67 20 75 73 65 64 2c 20 61 |ng being used, a| 00004030 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 72 65 2d |nd should be re-| 00004040 63 6f 64 65 64 20 69 6e 20 61 6e 6f 74 68 65 72 |coded in another| 00004050 20 77 61 79 2e 0a 0a 32 2e 31 30 20 4c 69 62 72 | way...2.10 Libr| 00004060 61 72 69 65 73 0a 0a 54 68 65 20 75 73 65 20 6f |aries..The use o| 00004070 66 20 74 68 65 20 4c 49 42 52 41 52 59 20 63 61 |f the LIBRARY ca| 00004080 6c 6c 20 69 73 20 72 65 63 6f 67 6e 69 73 65 64 |ll is recognised| 00004090 2e 20 20 49 74 20 63 61 75 73 65 73 20 74 68 65 |. It causes the| 000040a0 20 61 70 70 72 6f 70 72 69 61 74 65 20 66 69 6c | appropriate fil| 000040b0 65 20 74 6f 20 62 65 20 61 70 70 65 6e 64 65 64 |e to be appended| 000040c0 20 74 6f 20 74 68 65 20 71 75 65 75 65 20 6f 66 | to the queue of| 000040d0 20 66 69 6c 65 73 20 74 6f 20 62 65 20 70 61 72 | files to be par| 000040e0 73 65 64 2c 20 61 6e 64 20 74 68 65 20 65 6e 74 |sed, and the ent| 000040f0 69 72 65 20 4c 49 42 52 41 52 59 20 73 74 61 74 |ire LIBRARY stat| 00004100 65 6d 65 6e 74 20 74 6f 20 62 65 20 72 65 6d 6f |ement to be remo| 00004110 76 65 64 20 66 72 6f 6d 20 74 68 65 20 6f 75 74 |ved from the out| 00004120 70 75 74 2e 0a 0a 46 6f 72 20 74 68 69 73 20 74 |put...For this t| 00004130 6f 20 77 6f 72 6b 2c 20 42 61 73 43 6f 6d 70 72 |o work, BasCompr| 00004140 65 73 73 20 61 73 73 75 6d 65 73 20 61 20 73 69 |ess assumes a si| 00004150 6d 70 6c 65 20 73 74 72 69 6e 67 20 63 6f 6e 73 |mple string cons| 00004160 74 61 6e 74 20 66 6f 6c 6c 6f 77 73 20 74 68 65 |tant follows the| 00004170 20 4c 49 42 52 41 52 59 2e 20 20 49 66 20 74 68 | LIBRARY. If th| 00004180 69 73 20 69 73 20 6e 6f 74 20 74 68 65 20 63 61 |is is not the ca| 00004190 73 65 20 61 6e 64 20 69 74 20 75 73 65 73 20 61 |se and it uses a| 000041a0 20 76 61 72 69 61 62 6c 65 2f 72 6f 75 74 69 6e | variable/routin| 000041b0 65 20 70 61 72 61 6d 65 74 65 72 20 74 68 65 6e |e parameter then| 000041c0 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 | you will need t| 000041d0 6f 20 73 65 74 20 75 70 20 61 20 53 70 65 63 69 |o set up a Speci| 000041e0 61 6c 20 66 69 6c 65 2e 20 20 54 68 69 73 20 77 |al file. This w| 000041f0 69 6c 6c 20 74 65 6c 6c 20 42 61 73 43 6f 6d 70 |ill tell BasComp| 00004200 72 65 73 73 20 77 68 61 74 20 74 6f 20 65 78 70 |ress what to exp| 00004210 65 63 74 20 74 68 65 20 76 61 72 69 61 62 6c 65 |ect the variable| 00004220 20 74 6f 20 62 65 20 73 6f 20 69 74 20 63 61 6e | to be so it can| 00004230 20 6c 6f 61 64 20 74 68 65 20 63 6f 72 72 65 63 | load the correc| 00004240 74 20 66 69 6c 65 2e 20 20 50 6c 65 61 73 65 20 |t file. Please | 00004250 72 65 66 65 72 20 74 6f 20 74 68 65 20 a7 36 2e |refer to the .6.| 00004260 0a 0a 41 6c 6c 20 4c 49 42 52 41 52 59 20 66 69 |..All LIBRARY fi| 00004270 6c 65 73 20 61 72 65 20 6f 6e 6c 79 20 65 76 65 |les are only eve| 00004280 72 20 73 63 61 6e 6e 65 64 20 6f 6e 63 65 2c 20 |r scanned once, | 00004290 65 76 65 6e 20 69 66 20 69 74 20 69 73 20 69 6e |even if it is in| 000042a0 63 6c 75 64 65 64 20 6d 61 6e 79 20 74 69 6d 65 |cluded many time| 000042b0 73 2e 0a 0a 32 2e 31 30 2e 31 20 4d 75 6c 74 69 |s...2.10.1 Multi| 000042c0 70 6c 79 2d 64 65 66 69 6e 65 64 20 72 6f 75 74 |ply-defined rout| 000042d0 69 6e 65 73 20 69 6e 20 6c 69 62 72 61 72 69 65 |ines in librarie| 000042e0 73 0a 0a 4e 6f 74 65 20 74 68 61 74 20 74 68 65 |s..Note that the| 000042f0 20 6c 6f 61 64 69 6e 67 20 6f 66 20 6c 69 62 72 | loading of libr| 00004300 61 72 69 65 73 2c 20 61 73 20 70 65 72 66 6f 72 |aries, as perfor| 00004310 6d 65 64 20 62 79 20 42 61 73 43 6f 6d 70 72 65 |med by BasCompre| 00004320 73 73 20 69 73 20 6e 6f 74 20 65 78 61 63 74 6c |ss is not exactl| 00004330 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 |y the same as th| 00004340 65 20 6f 72 64 65 72 20 74 68 61 74 20 42 61 73 |e order that Bas| 00004350 69 63 56 20 77 6f 75 6c 64 20 68 61 76 65 20 6c |icV would have l| 00004360 6f 61 64 65 64 20 74 68 65 6d 20 69 6e 2e 20 20 |oaded them in. | 00004370 54 68 69 73 20 63 6f 75 6c 64 20 6f 6e 6c 79 20 |This could only | 00004380 63 61 75 73 65 20 61 20 70 72 6f 62 6c 65 6d 20 |cause a problem | 00004390 69 66 20 6d 75 6c 74 69 70 6c 79 2d 64 65 66 69 |if multiply-defi| 000043a0 6e 65 64 20 72 6f 75 74 69 6e 65 73 20 65 78 69 |ned routines exi| 000043b0 73 74 2c 20 61 6e 64 20 66 75 72 74 68 65 72 20 |st, and further | 000043c0 6d 6f 72 65 20 74 68 65 73 65 20 6d 75 6c 74 69 |more these multi| 000043d0 70 6c 65 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 |ple definitions | 000043e0 61 72 65 20 74 68 65 6d 73 65 6c 76 65 73 20 69 |are themselves i| 000043f0 6e 20 6c 69 62 72 61 72 79 20 66 69 6c 65 73 2c |n library files,| 00004400 20 6e 6f 74 20 74 68 65 20 6d 61 69 6e 20 66 69 | not the main fi| 00004410 6c 65 2e 20 20 49 66 20 74 68 69 73 20 73 69 74 |le. If this sit| 00004420 75 61 74 69 6f 6e 20 64 6f 65 73 20 61 72 69 73 |uation does aris| 00004430 65 2c 20 74 68 65 6e 20 74 68 65 20 6b 6c 75 64 |e, then the klud| 00004440 67 65 20 69 73 3a 20 69 6e 63 6c 75 64 65 20 74 |ge is: include t| 00004450 68 65 20 6c 69 62 72 61 72 79 20 63 6f 6e 74 61 |he library conta| 00004460 69 6e 69 6e 67 20 74 68 65 20 70 72 65 66 65 72 |ining the prefer| 00004470 72 65 64 20 64 65 66 69 6e 69 74 69 6f 6e 20 74 |red definition t| 00004480 77 69 63 65 2c 20 6f 6e 63 65 20 62 65 66 6f 72 |wice, once befor| 00004490 65 20 61 6e 64 20 6f 6e 63 65 20 61 66 74 65 72 |e and once after| 000044a0 20 74 68 65 20 4c 49 42 52 41 52 59 20 63 6f 6e | the LIBRARY con| 000044b0 74 61 69 6e 69 6e 67 20 74 68 65 20 75 6e 77 61 |taining the unwa| 000044c0 6e 74 65 64 20 64 65 66 69 6e 69 74 69 6f 6e 2e |nted definition.| 000044d0 20 20 54 68 69 73 20 77 69 6c 6c 20 77 6f 72 6b | This will work| 000044e0 20 62 65 63 61 75 73 65 20 42 61 73 43 6f 6d 70 | because BasComp| 000044f0 72 65 73 73 20 77 69 6c 6c 20 75 73 65 20 74 68 |ress will use th| 00004500 65 20 66 69 72 73 74 20 6c 6f 61 64 65 64 2c 20 |e first loaded, | 00004510 61 6e 64 20 74 68 65 20 75 6e 63 6f 6d 70 72 65 |and the uncompre| 00004520 73 73 65 64 20 70 72 6f 67 72 61 6d 20 77 6f 75 |ssed program wou| 00004530 6c 64 20 75 73 65 20 74 68 65 20 73 65 63 6f 6e |ld use the secon| 00004540 64 21 0a 0a 4f 66 20 63 6f 75 72 73 65 2c 20 74 |d!..Of course, t| 00004550 68 65 20 6c 6f 61 64 69 6e 67 20 6f 66 20 6c 69 |he loading of li| 00004560 62 72 61 72 69 65 73 20 77 69 6c 6c 20 6d 65 61 |braries will mea| 00004570 6e 20 74 68 61 74 20 74 68 65 20 63 75 72 72 65 |n that the curre| 00004580 6e 74 20 64 69 72 65 63 74 6f 72 79 20 61 6e 64 |nt directory and| 00004590 2f 6f 72 20 73 6f 6d 65 20 73 79 73 74 65 6d 20 |/or some system | 000045a0 76 61 72 69 61 62 6c 65 73 20 28 65 2e 67 2e 20 |variables (e.g. | 000045b0 41 70 70 24 44 69 72 29 20 6d 61 79 20 6e 65 65 |App$Dir) may nee| 000045c0 64 20 74 6f 20 62 65 20 73 65 74 20 75 70 20 2d |d to be set up -| 000045d0 20 6f 74 68 65 72 77 69 73 65 20 42 61 73 43 6f | otherwise BasCo| 000045e0 6d 70 72 65 73 73 20 77 69 6c 6c 20 6e 6f 74 20 |mpress will not | 000045f0 62 65 20 61 62 6c 65 20 74 6f 20 6c 6f 63 61 74 |be able to locat| 00004600 65 20 74 68 65 20 6c 69 62 72 61 72 79 20 66 69 |e the library fi| 00004610 6c 65 2e 0a 0a 32 2e 31 31 20 4c 61 62 65 6c 20 |le...2.11 Label | 00004620 72 65 64 75 63 74 69 6f 6e 0a 0a 41 20 6c 6f 74 |reduction..A lot| 00004630 20 6f 66 20 74 68 65 20 74 69 6d 65 20 74 68 61 | of the time tha| 00004640 74 20 42 61 73 69 63 56 20 74 61 6b 65 73 20 74 |t BasicV takes t| 00004650 6f 20 69 6e 74 65 72 70 72 65 74 20 61 20 70 72 |o interpret a pr| 00004660 6f 67 72 61 6d 20 69 73 20 73 70 65 6e 74 20 6c |ogram is spent l| 00004670 6f 6f 6b 69 6e 67 20 75 70 20 76 61 72 69 61 62 |ooking up variab| 00004680 6c 65 20 6e 61 6d 65 73 2e 20 20 42 61 73 43 6f |le names. BasCo| 00004690 6d 70 72 65 73 73 20 77 69 6c 6c 20 61 74 74 65 |mpress will atte| 000046a0 6d 70 74 20 74 6f 20 72 65 64 75 63 65 20 74 68 |mpt to reduce th| 000046b0 65 20 6c 6f 6e 67 20 6c 61 62 65 6c 73 20 64 6f |e long labels do| 000046c0 77 6e 20 74 6f 20 73 69 7a 65 2c 20 6f 66 74 65 |wn to size, ofte| 000046d0 6e 20 70 72 6f 64 75 63 69 6e 67 20 64 72 61 6d |n producing dram| 000046e0 61 74 69 63 20 73 70 61 63 65 20 61 6e 64 20 73 |atic space and s| 000046f0 70 65 65 64 20 69 6d 70 72 6f 76 65 6d 65 6e 74 |peed improvement| 00004700 73 2e 20 20 54 68 65 20 61 6c 67 6f 72 69 74 68 |s. The algorith| 00004710 6d 20 75 73 65 64 20 65 6e 73 75 72 65 73 20 74 |m used ensures t| 00004720 68 61 74 20 74 68 65 20 6d 6f 73 74 20 75 73 65 |hat the most use| 00004730 64 20 76 61 72 69 61 62 6c 65 73 20 61 72 65 20 |d variables are | 00004740 63 68 6f 73 65 6e 20 66 6f 72 20 74 68 65 20 73 |chosen for the s| 00004750 68 6f 72 74 65 73 74 20 76 61 72 69 61 62 6c 65 |hortest variable| 00004760 20 6e 61 6d 65 73 2c 20 61 6e 64 20 74 68 65 20 | names, and the | 00004770 6e 61 6d 65 73 20 74 68 65 6d 73 65 6c 76 65 73 |names themselves| 00004780 20 61 72 65 20 63 68 6f 73 65 6e 20 73 6f 20 61 | are chosen so a| 00004790 73 20 74 6f 20 73 70 72 65 61 64 20 65 76 65 6e |s to spread even| 000047a0 6c 79 20 61 63 72 6f 73 73 20 74 68 65 20 6e 61 |ly across the na| 000047b0 6d 65 2d 73 70 61 63 65 2e 0a 0a 44 69 64 20 79 |me-space...Did y| 000047c0 6f 75 20 6e 6f 74 65 20 74 68 65 20 77 6f 72 64 |ou note the word| 000047d0 20 61 74 74 65 6d 70 74 20 69 6e 20 74 68 65 20 | attempt in the | 000047e0 61 62 6f 76 65 20 70 61 72 61 67 72 61 70 68 2e |above paragraph.| 000047f0 20 20 54 68 69 73 20 69 73 20 62 65 63 61 75 73 | This is becaus| 00004800 65 20 62 61 73 69 63 20 69 73 20 61 6e 20 69 6e |e basic is an in| 00004810 74 65 72 70 72 65 74 65 64 20 6c 61 6e 67 75 61 |terpreted langua| 00004820 67 65 20 61 6e 64 20 70 72 6f 76 69 64 65 73 20 |ge and provides | 00004830 74 68 65 20 70 6f 77 65 72 66 75 6c 20 63 6f 6d |the powerful com| 00004840 6d 61 6e 64 73 20 45 56 41 4c 20 61 6e 64 20 44 |mands EVAL and D| 00004850 41 54 41 2c 20 61 6c 6c 6f 77 69 6e 67 20 65 78 |ATA, allowing ex| 00004860 70 72 65 73 73 69 6f 6e 73 20 74 6f 20 62 65 20 |pressions to be | 00004870 65 76 61 6c 75 61 74 65 64 20 69 6e 20 74 68 65 |evaluated in the| 00004880 20 63 75 72 72 65 6e 74 20 63 6f 6e 74 65 78 74 | current context| 00004890 2e 20 20 46 6f 72 20 69 6e 73 74 61 6e 63 65 20 |. For instance | 000048a0 45 56 41 4c 28 22 7a 61 70 70 61 25 22 29 20 77 |EVAL("zappa%") w| 000048b0 6f 75 6c 64 20 79 69 65 6c 64 20 74 68 65 20 76 |ould yield the v| 000048c0 61 6c 75 65 20 6f 66 20 74 68 65 20 76 61 72 69 |alue of the vari| 000048d0 61 62 6c 65 20 7a 61 70 70 61 25 2e 20 20 42 75 |able zappa%. Bu| 000048e0 74 2c 20 69 66 20 42 61 73 43 6f 6d 70 72 65 73 |t, if BasCompres| 000048f0 73 20 68 61 64 20 72 65 64 75 63 65 64 20 74 68 |s had reduced th| 00004900 69 73 20 76 61 72 69 61 62 6c 65 20 64 6f 77 6e |is variable down| 00004910 20 74 6f 2c 20 73 61 79 2c 20 41 25 20 69 6e 20 | to, say, A% in | 00004920 74 68 65 20 72 65 73 74 20 6f 66 20 74 68 65 20 |the rest of the | 00004930 70 72 6f 67 72 61 6d 20 28 62 65 63 61 75 73 65 |program (because| 00004940 20 20 69 74 20 61 6e 61 6c 79 73 65 64 20 74 68 | it analysed th| 00004950 65 20 70 72 6f 67 72 61 6d 20 69 6e 20 61 20 64 |e program in a d| 00004960 69 66 66 65 72 65 6e 74 20 63 6f 6e 74 65 78 74 |ifferent context| 00004970 29 20 74 68 65 6e 20 77 68 61 74 20 68 61 70 70 |) then what happ| 00004980 65 6e 73 20 61 74 20 72 75 6e 2d 74 69 6d 65 20 |ens at run-time | 00004990 69 73 20 79 6f 75 20 67 65 74 20 61 20 76 61 72 |is you get a var| 000049a0 69 61 62 6c 65 20 6e 6f 74 20 66 6f 75 6e 64 20 |iable not found | 000049b0 65 72 72 6f 72 2e 0a 0a 54 68 65 72 65 20 61 72 |error...There ar| 000049c0 65 20 74 77 6f 20 73 6f 6c 75 74 69 6f 6e 73 20 |e two solutions | 000049d0 74 6f 20 74 68 69 73 20 76 65 72 79 20 63 6f 6d |to this very com| 000049e0 6d 6f 6e 20 70 72 6f 62 6c 65 6d 2e 20 20 54 68 |mon problem. Th| 000049f0 65 20 66 69 72 73 74 20 69 73 20 74 6f 20 64 69 |e first is to di| 00004a00 73 61 62 6c 65 20 6c 61 62 65 6c 20 72 65 64 75 |sable label redu| 00004a10 63 74 69 6f 6e 20 6f 6e 20 61 6c 6c 20 76 61 72 |ction on all var| 00004a20 69 61 62 6c 65 73 20 6f 66 20 74 68 65 20 74 79 |iables of the ty| 00004a30 70 65 20 74 68 61 74 20 61 72 65 20 75 73 65 64 |pe that are used| 00004a40 20 69 6e 20 45 56 41 4c 20 6f 72 20 44 41 54 41 | in EVAL or DATA| 00004a50 20 73 74 61 74 65 6d 65 6e 74 73 2e 20 20 54 68 | statements. Th| 00004a60 69 73 20 69 73 20 65 78 74 72 65 6d 65 6c 79 20 |is is extremely | 00004a70 77 61 73 74 65 66 75 6c 2c 20 62 75 74 20 74 68 |wasteful, but th| 00004a80 65 20 6f 6e 6c 79 20 6f 70 74 69 6f 6e 20 61 76 |e only option av| 00004a90 61 69 6c 61 62 6c 65 20 69 6e 20 6f 74 68 65 72 |ailable in other| 00004aa0 20 73 71 75 61 73 68 65 72 73 2e 20 20 57 69 74 | squashers. Wit| 00004ab0 68 20 42 61 73 43 6f 6d 70 72 65 73 73 20 74 68 |h BasCompress th| 00004ac0 65 72 65 20 69 73 20 61 20 6d 75 63 68 20 6d 6f |ere is a much mo| 00004ad0 72 65 20 65 6c 65 67 61 6e 74 20 73 6f 6c 75 74 |re elegant solut| 00004ae0 69 6f 6e 20 2d 20 79 6f 75 20 63 61 6e 20 73 70 |ion - you can sp| 00004af0 65 63 69 66 79 20 61 6c 6c 20 74 68 65 20 6c 61 |ecify all the la| 00004b00 62 65 6c 73 20 74 68 61 74 20 6d 75 73 74 20 6e |bels that must n| 00004b10 6f 74 20 62 65 20 72 65 64 75 63 65 64 2e 20 20 |ot be reduced. | 00004b20 46 75 72 74 68 65 72 20 6d 6f 72 65 2c 20 74 68 |Further more, th| 00004b30 65 73 65 20 76 61 72 69 61 62 6c 65 73 20 63 61 |ese variables ca| 00004b40 6e 20 62 65 20 69 6d 70 6c 69 65 64 20 66 72 6f |n be implied fro| 00004b50 6d 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 |m the parameters| 00004b60 20 70 61 73 73 65 64 20 74 6f 20 61 20 72 6f 75 | passed to a rou| 00004b70 74 69 6e 65 21 0a 0a 46 6f 72 20 65 78 61 6d 70 |tine!..For examp| 00004b80 6c 65 2c 20 6d 61 6e 79 20 57 69 6d 70 2d 62 61 |le, many Wimp-ba| 00004b90 73 65 64 20 70 72 6f 67 72 61 6d 73 20 77 69 6c |sed programs wil| 00004ba0 6c 20 68 61 76 65 20 61 20 6d 65 6e 75 2d 63 6f |l have a menu-co| 00004bb0 6e 73 74 72 75 63 74 69 6f 6e 20 73 75 69 74 65 |nstruction suite| 00004bc0 20 6f 66 20 72 6f 75 74 69 6e 65 73 2e 20 20 54 | of routines. T| 00004bd0 68 65 73 65 20 77 69 6c 6c 20 62 65 20 70 61 73 |hese will be pas| 00004be0 73 65 64 20 61 20 73 74 72 69 6e 67 20 74 68 61 |sed a string tha| 00004bf0 74 20 64 65 73 63 72 69 62 65 73 20 74 68 65 20 |t describes the | 00004c00 6d 65 6e 75 2e 20 20 49 6e 73 69 64 65 20 74 68 |menu. Inside th| 00004c10 69 73 20 73 74 72 69 6e 67 20 77 69 6c 6c 20 62 |is string will b| 00004c20 65 20 72 65 66 65 72 65 6e 63 65 73 20 74 6f 20 |e references to | 00004c30 76 61 72 69 61 62 6c 65 73 20 74 68 61 74 20 61 |variables that a| 00004c40 74 20 72 75 6e 2d 74 69 6d 65 20 77 69 6c 6c 20 |t run-time will | 00004c50 70 6f 69 6e 74 20 74 6f 20 6d 6f 72 65 20 69 6e |point to more in| 00004c60 66 6f 72 6d 61 74 69 6f 6e 20 28 73 75 62 2d 6d |formation (sub-m| 00004c70 65 6e 75 73 20 6f 72 20 77 69 6e 64 6f 77 73 20 |enus or windows | 00004c80 75 73 75 61 6c 6c 79 29 2e 20 20 57 69 74 68 20 |usually). With | 00004c90 42 61 73 43 6f 6d 70 72 65 73 73 2c 20 79 6f 75 |BasCompress, you| 00004ca0 20 63 61 6e 20 67 65 74 20 69 74 20 74 6f 20 61 | can get it to a| 00004cb0 6e 61 6c 79 73 65 20 61 6c 6c 20 74 68 65 73 65 |nalyse all these| 00004cc0 20 73 74 72 69 6e 67 73 2c 20 65 78 74 72 61 63 | strings, extrac| 00004cd0 74 20 74 68 65 20 76 61 72 69 61 62 6c 65 73 2c |t the variables,| 00004ce0 20 61 6e 64 20 74 68 65 6e 20 72 65 64 75 63 65 | and then reduce| 00004cf0 20 61 6c 6c 20 6f 74 68 65 72 20 76 61 72 69 61 | all other varia| 00004d00 62 6c 65 73 20 61 70 61 72 74 20 66 72 6f 6d 20 |bles apart from | 00004d10 74 68 6f 73 65 2e 20 20 54 68 69 73 20 69 73 20 |those. This is | 00004d20 61 20 76 65 72 79 20 70 6f 77 65 72 66 75 6c 20 |a very powerful | 00004d30 66 65 61 74 75 72 65 2e 20 20 53 65 65 20 74 68 |feature. See th| 00004d40 65 20 a7 36 20 66 6f 72 20 6d 6f 72 65 20 69 6e |e .6 for more in| 00004d50 66 6f 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 42 |fo...Note that B| 00004d60 61 73 43 6f 6d 70 72 65 73 73 20 67 6f 65 73 20 |asCompress goes | 00004d70 74 6f 20 74 68 65 20 74 72 6f 75 62 6c 65 20 6f |to the trouble o| 00004d80 66 20 6d 61 6b 69 6e 67 20 73 75 72 65 20 74 68 |f making sure th| 00004d90 61 74 20 69 74 20 6e 65 76 65 72 20 70 72 6f 64 |at it never prod| 00004da0 75 63 65 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 |uces one of the | 00004db0 94 62 75 69 6c 74 2d 69 6e 95 20 72 65 67 69 73 |.built-in. regis| 00004dc0 74 65 72 20 6c 61 62 65 6c 73 20 75 73 65 64 20 |ter labels used | 00004dd0 62 79 20 74 68 65 20 61 73 73 65 6d 62 6c 65 72 |by the assembler| 00004de0 20 28 52 30 2d 52 31 35 2c 20 70 63 29 2e 20 20 | (R0-R15, pc). | 00004df0 4f 6e 20 6f 74 68 65 72 20 62 61 73 69 63 20 73 |On other basic s| 00004e00 71 75 61 73 68 65 72 73 20 74 68 69 73 20 63 61 |quashers this ca| 00004e10 6e 20 6c 65 61 64 20 74 6f 20 56 45 52 59 20 6f |n lead to VERY o| 00004e20 62 73 63 75 72 65 20 62 75 67 73 2e 0a 0a 41 6c |bscure bugs...Al| 00004e30 73 6f 20 77 6f 72 74 68 20 6d 65 6e 74 69 6f 6e |so worth mention| 00004e40 69 6e 67 20 69 73 20 74 68 61 74 20 61 6e 79 20 |ing is that any | 00004e50 6c 61 62 65 6c 73 20 61 63 63 65 73 73 65 64 20 |labels accessed | 00004e60 69 6e 73 69 64 65 20 64 65 6c 65 74 65 64 20 72 |inside deleted r| 00004e70 6f 75 74 69 6e 65 73 20 61 72 65 20 61 75 74 6f |outines are auto| 00004e80 6d 61 74 69 63 61 6c 6c 79 20 72 65 6d 6f 76 65 |matically remove| 00004e90 64 20 66 72 6f 6d 20 74 68 65 20 6c 69 73 74 20 |d from the list | 00004ea0 6f 66 20 6c 61 62 65 6c 73 20 74 6f 20 72 65 64 |of labels to red| 00004eb0 75 63 65 2e 20 20 54 68 69 73 20 70 72 6f 64 75 |uce. This produ| 00004ec0 63 65 73 20 62 65 74 74 65 72 20 72 65 73 75 6c |ces better resul| 00004ed0 74 73 20 74 68 61 6e 20 6a 75 73 74 20 72 65 64 |ts than just red| 00004ee0 75 63 69 6e 67 20 61 6c 6c 20 6c 61 62 65 6c 73 |ucing all labels| 00004ef0 20 66 6f 75 6e 64 2e 0a 0a 42 61 73 43 6f 6d 70 | found...BasComp| 00004f00 72 65 73 73 20 63 61 6e 20 68 61 6e 64 6c 65 20 |ress can handle | 00004f10 61 6e 79 20 6e 75 6d 62 65 72 20 6f 66 20 6c 61 |any number of la| 00004f20 62 65 6c 73 2c 20 77 65 6c 6c 20 61 73 20 6d 61 |bels, well as ma| 00004f30 6e 79 20 61 73 20 63 6f 75 6c 64 20 66 69 74 20 |ny as could fit | 00004f40 69 6e 74 6f 20 31 36 4d 62 20 6f 66 20 52 41 4d |into 16Mb of RAM| 00004f50 20 3a 2d 29 0a 0a 32 2e 31 32 20 4c 69 6e 65 20 | :-)..2.12 Line | 00004f60 6e 75 6d 62 65 72 73 0a 0a 4e 6f 72 6d 61 6c 6c |numbers..Normall| 00004f70 79 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 61 |y line numbers a| 00004f80 72 65 20 61 6e 20 61 6e 61 74 68 65 6d 61 20 62 |re an anathema b| 00004f90 75 74 20 74 68 65 72 65 20 64 6f 65 73 20 65 78 |ut there does ex| 00004fa0 69 73 74 20 61 20 76 61 6c 69 64 20 72 65 61 73 |ist a valid reas| 00004fb0 6f 6e 20 66 6f 72 20 75 73 69 6e 67 20 74 68 65 |on for using the| 00004fc0 6d 20 69 6e 20 42 61 73 69 63 56 2c 20 61 6e 64 |m in BasicV, and| 00004fd0 20 73 6f 20 6c 69 6e 65 20 6e 75 6d 62 65 72 20 | so line number | 00004fe0 68 61 6e 64 6c 69 6e 67 20 68 61 73 20 62 65 65 |handling has bee| 00004ff0 6e 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 42 61 |n included in Ba| 00005000 73 43 6f 6d 70 72 65 73 73 2e 20 20 54 68 65 20 |sCompress. The | 00005010 72 65 61 73 6f 6e 20 77 68 79 20 6c 69 6e 65 20 |reason why line | 00005020 6e 75 6d 62 65 72 73 20 6d 61 79 20 62 65 20 6e |numbers may be n| 00005030 65 65 64 65 64 20 69 73 20 69 66 20 61 20 70 72 |eeded is if a pr| 00005040 6f 67 72 61 6d 20 63 6c 61 69 6d 73 20 6d 6f 72 |ogram claims mor| 00005050 65 20 6d 65 6d 6f 72 79 20 74 68 6f 75 67 68 20 |e memory though | 00005060 74 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 45 |the use of the E| 00005070 4e 44 3d 3c 65 78 70 72 3e 20 63 6f 6e 73 74 72 |ND=<expr> constr| 00005080 75 63 74 2e 20 20 54 68 69 73 20 68 61 73 20 74 |uct. This has t| 00005090 68 65 20 75 6e 66 6f 72 74 75 6e 61 74 65 20 73 |he unfortunate s| 000050a0 69 64 65 2d 65 66 66 65 63 74 20 6f 66 20 72 65 |ide-effect of re| 000050b0 6d 6f 76 69 6e 67 20 61 6c 6c 20 72 6f 75 74 69 |moving all routi| 000050c0 6e 65 20 6c 65 76 65 6c 20 69 6e 66 6f 2c 20 73 |ne level info, s| 000050d0 6f 20 79 6f 75 20 68 61 76 65 20 74 6f 20 47 4f |o you have to GO| 000050e0 54 4f 20 74 68 65 20 6d 61 69 6e 20 70 72 6f 67 |TO the main prog| 000050f0 72 61 6d 20 6c 6f 6f 70 29 2e 0a 0a 4f 62 76 69 |ram loop)...Obvi| 00005100 6f 75 73 6c 79 2c 20 6c 69 6e 65 20 6e 75 6d 62 |ously, line numb| 00005110 65 72 73 20 66 6f 75 6e 64 20 69 6e 20 61 6e 79 |ers found in any| 00005120 20 6c 69 62 72 61 72 79 20 66 69 6c 65 73 20 61 | library files a| 00005130 72 65 20 66 61 75 6c 74 65 64 20 61 73 20 74 68 |re faulted as th| 00005140 65 72 65 20 69 73 20 6e 6f 20 76 61 6c 69 64 20 |ere is no valid | 00005150 72 65 61 73 6f 6e 20 66 6f 72 20 74 68 65 6d 20 |reason for them | 00005160 62 65 69 6e 67 20 74 68 65 72 65 2e 0a 0a 4e 6f |being there...No| 00005170 74 65 20 74 68 61 74 20 69 6e 20 73 68 6f 72 74 |te that in short| 00005180 20 70 72 6f 67 72 61 6d 73 20 69 74 20 69 73 20 | programs it is | 00005190 6a 75 73 74 20 70 6f 73 73 69 62 6c 65 20 74 68 |just possible th| 000051a0 61 74 20 74 68 65 72 65 20 77 69 6c 6c 20 62 65 |at there will be| 000051b0 20 61 20 47 4f 54 4f 20 74 6f 20 61 20 64 65 73 | a GOTO to a des| 000051c0 74 69 6e 61 74 69 6f 6e 20 6f 75 74 73 69 64 65 |tination outside| 000051d0 20 62 6f 74 68 20 74 68 65 20 6d 61 69 6e 20 70 | both the main p| 000051e0 72 6f 67 72 61 6d 20 61 6e 64 20 61 6c 6c 20 6f |rogram and all o| 000051f0 74 68 65 72 20 72 6f 75 74 69 6e 65 73 2e 20 20 |ther routines. | 00005200 43 75 72 72 65 6e 74 6c 79 20 42 61 73 43 6f 6d |Currently BasCom| 00005210 70 72 65 73 73 20 64 6f 65 73 20 6e 6f 74 20 68 |press does not h| 00005220 61 6e 64 6c 65 20 74 68 69 73 20 28 72 61 74 68 |andle this (rath| 00005230 65 72 20 72 61 72 65 29 20 63 61 73 65 2e 20 20 |er rare) case. | 00005240 41 73 20 61 20 6b 6c 75 64 67 65 2c 20 73 75 72 |As a kludge, sur| 00005250 72 6f 75 6e 64 20 74 68 65 20 6f 66 66 65 6e 64 |round the offend| 00005260 69 6e 67 20 63 6f 64 65 20 69 6e 20 61 20 64 75 |ing code in a du| 00005270 6d 6d 79 20 72 6f 75 74 69 6e 65 2e 0a 0a 32 2e |mmy routine...2.| 00005280 31 32 2e 31 20 4f 75 74 70 75 74 20 6c 69 6e 65 |12.1 Output line| 00005290 20 6e 75 6d 62 65 72 73 0a 0a 49 66 20 6e 6f 20 | numbers..If no | 000052a0 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 77 65 72 |line numbers wer| 000052b0 65 20 66 6f 75 6e 64 20 74 68 65 6e 20 6c 69 6e |e found then lin| 000052c0 65 20 6e 75 6d 62 65 72 69 6e 67 20 69 73 20 65 |e numbering is e| 000052d0 61 73 79 2e 20 20 46 6f 72 20 73 69 6e 67 6c 65 |asy. For single| 000052e0 2d 66 69 6c 65 20 70 72 6f 67 72 61 6d 73 20 74 |-file programs t| 000052f0 68 65 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 |he line numbers | 00005300 6b 65 65 70 20 74 6f 20 74 68 65 69 72 20 6f 72 |keep to their or| 00005310 69 67 69 6e 61 6c 20 76 61 6c 75 65 73 2c 20 65 |iginal values, e| 00005320 76 65 6e 20 69 66 20 6d 75 6c 74 69 2d 6c 69 6e |ven if multi-lin| 00005330 65 20 63 6f 6d 70 61 63 74 69 6f 6e 20 69 73 20 |e compaction is | 00005340 65 6e 61 62 6c 65 64 2e 20 20 46 6f 72 20 6d 75 |enabled. For mu| 00005350 6c 74 69 2d 66 69 6c 65 20 70 72 6f 67 72 61 6d |lti-file program| 00005360 73 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c |s the output fil| 00005370 65 20 73 74 61 72 74 73 20 66 72 6f 6d 20 31 20 |e starts from 1 | 00005380 61 6e 64 20 69 6e 63 72 65 61 73 65 73 20 69 6e |and increases in| 00005390 20 73 74 65 70 73 20 6f 66 20 31 2e 0a 0a 49 66 | steps of 1...If| 000053a0 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 77 65 | line numbers we| 000053b0 72 65 20 66 6f 75 6e 64 20 74 68 65 6e 20 74 68 |re found then th| 000053c0 65 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 69 |e line numbers i| 000053d0 6e 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 70 |n the original p| 000053e0 72 6f 67 72 61 6d 20 61 72 65 20 75 73 65 64 20 |rogram are used | 000053f0 66 6f 72 20 74 68 65 20 6f 72 69 67 69 6e 61 6c |for the original| 00005400 20 70 72 6f 67 72 61 6d 20 70 61 72 74 2c 20 61 | program part, a| 00005410 6e 64 20 74 68 65 72 65 61 66 74 65 72 20 6c 69 |nd thereafter li| 00005420 6e 65 20 6e 75 6d 62 65 72 73 20 69 6e 63 72 65 |ne numbers incre| 00005430 6d 65 6e 74 20 69 6e 20 73 74 65 70 73 20 6f 66 |ment in steps of| 00005440 20 6f 6e 65 20 66 6f 72 20 61 6e 79 20 66 75 72 | one for any fur| 00005450 74 68 65 72 20 6c 69 62 72 61 72 69 65 73 2e 0a |ther libraries..| 00005460 0a 55 6e 66 6f 72 74 75 6e 61 74 65 6c 79 20 42 |.Unfortunately B| 00005470 61 73 69 63 56 20 6f 6e 6c 79 20 61 6c 6c 6f 77 |asicV only allow| 00005480 73 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 75 |s line numbers u| 00005490 70 20 74 6f 20 61 72 6f 75 6e 64 20 36 35 30 30 |p to around 6500| 000054a0 30 20 6f 64 64 2e 20 20 54 68 69 73 20 63 6f 75 |0 odd. This cou| 000054b0 6c 64 20 70 6f 73 73 69 62 6c 79 20 62 65 20 61 |ld possibly be a| 000054c0 20 70 72 6f 62 6c 65 6d 20 69 66 20 74 68 65 20 | problem if the | 000054d0 6f 72 69 67 69 6e 61 6c 20 70 72 6f 67 72 61 6d |original program| 000054e0 20 68 61 73 20 6c 69 6e 65 20 6e 75 6d 62 65 72 | has line number| 000054f0 73 20 75 70 20 74 6f 2c 20 73 61 79 2c 20 36 34 |s up to, say, 64| 00005500 30 30 30 2c 20 61 6e 64 20 69 6e 63 6c 75 64 65 |000, and include| 00005510 73 20 71 75 69 74 65 20 61 20 66 65 77 20 6c 69 |s quite a few li| 00005520 62 72 61 72 79 20 66 69 6c 65 73 2e 20 20 54 68 |brary files. Th| 00005530 69 73 20 69 73 20 6f 6e 65 20 6f 66 20 74 68 65 |is is one of the| 00005540 20 66 65 77 20 70 6f 73 73 69 62 6c 65 20 65 72 | few possible er| 00005550 72 6f 72 73 20 74 68 61 74 20 61 72 65 20 6e 6f |rors that are no| 00005560 74 20 63 68 65 63 6b 65 64 20 66 6f 72 2c 20 61 |t checked for, a| 00005570 73 20 74 68 65 20 70 6f 73 73 69 62 69 6c 69 74 |s the possibilit| 00005580 79 20 6f 66 20 69 74 20 6f 63 63 75 72 72 69 6e |y of it occurrin| 00005590 67 20 61 72 65 20 6a 75 73 74 20 73 6f 20 72 65 |g are just so re| 000055a0 6d 6f 74 65 2e 0a 0a 32 2e 31 33 20 4d 75 6c 74 |mote...2.13 Mult| 000055b0 69 2d 6c 69 6e 65 20 6f 75 74 70 75 74 0a 0a 4e |i-line output..N| 000055c0 6f 72 6d 61 6c 6c 79 20 61 73 20 6d 61 6e 79 20 |ormally as many | 000055d0 73 74 61 74 65 6d 65 6e 74 73 20 61 72 65 20 63 |statements are c| 000055e0 6f 6d 70 72 65 73 73 65 64 20 6f 6e 74 6f 20 6f |ompressed onto o| 000055f0 6e 65 20 6f 75 74 70 75 74 20 6c 69 6e 65 20 61 |ne output line a| 00005600 73 20 77 69 6c 6c 20 66 69 74 2e 20 20 54 68 69 |s will fit. Thi| 00005610 73 20 70 72 6f 64 75 63 65 73 20 74 68 65 20 73 |s produces the s| 00005620 6d 61 6c 6c 65 73 74 20 66 69 6c 65 73 20 61 73 |mallest files as| 00005630 20 74 68 65 20 6f 76 65 72 68 65 61 64 20 74 68 | the overhead th| 00005640 61 74 20 42 61 73 69 63 20 69 6d 70 6f 73 65 73 |at Basic imposes| 00005650 20 6f 6e 20 65 61 63 68 20 6c 69 6e 65 20 69 73 | on each line is| 00005660 20 72 65 64 75 63 65 64 20 62 79 20 71 75 69 74 | reduced by quit| 00005670 65 20 61 20 62 69 74 2e 0a 0a 48 6f 77 65 76 65 |e a bit...Howeve| 00005680 72 2c 20 69 74 20 63 61 6e 20 70 72 6f 64 75 63 |r, it can produc| 00005690 65 20 63 6f 64 65 20 74 68 61 74 20 72 75 6e 73 |e code that runs| 000056a0 20 73 6c 6f 77 65 72 2e 20 20 54 68 69 73 20 69 | slower. This i| 000056b0 73 20 62 65 63 61 75 73 65 20 69 74 20 61 70 70 |s because it app| 000056c0 65 61 72 73 20 42 61 73 69 63 56 20 6f 6e 6c 79 |ears BasicV only| 000056d0 20 6e 6f 74 65 73 20 74 68 65 20 73 74 61 74 65 | notes the state| 000056e0 6d 65 6e 74 20 6e 75 6d 62 65 72 20 6f 66 20 61 |ment number of a| 000056f0 6e 20 69 6d 70 6c 69 63 69 74 20 6a 75 6d 70 20 |n implicit jump | 00005700 28 65 2e 67 2e 20 61 66 74 65 72 20 61 20 46 4f |(e.g. after a FO| 00005710 52 2c 20 57 48 49 4c 45 2c 20 6f 72 20 52 45 50 |R, WHILE, or REP| 00005720 45 41 54 29 2e 20 20 41 6e 64 20 73 6f 20 69 66 |EAT). And so if| 00005730 20 74 68 69 73 20 69 73 20 6f 6e 20 73 74 61 74 | this is on stat| 00005740 65 6d 65 6e 74 20 35 36 20 6f 66 20 61 20 6c 69 |ement 56 of a li| 00005750 6e 65 2c 20 73 61 79 2c 20 74 68 65 6e 20 69 74 |ne, say, then it| 00005760 20 68 61 73 20 74 6f 20 73 63 61 6e 20 61 6c 6c | has to scan all| 00005770 20 61 6c 6f 6e 67 20 74 68 65 20 6c 69 6e 65 20 | along the line | 00005780 74 6f 20 66 69 6e 64 20 77 68 65 72 65 20 74 6f |to find where to| 00005790 20 63 6f 6e 74 69 6e 75 65 20 65 78 65 63 75 74 | continue execut| 000057a0 69 6f 6e 2e 20 20 54 68 69 73 20 73 69 74 75 61 |ion. This situa| 000057b0 74 69 6f 6e 20 6d 61 79 20 62 65 20 72 65 63 6f |tion may be reco| 000057c0 67 6e 69 73 65 64 20 69 6e 20 61 20 66 75 74 75 |gnised in a futu| 000057d0 72 65 20 75 70 67 72 61 64 65 20 62 79 20 66 6f |re upgrade by fo| 000057e0 72 63 69 6e 67 20 74 68 65 20 73 74 61 74 65 6d |rcing the statem| 000057f0 65 6e 74 20 61 66 74 65 72 20 6f 6e 65 20 6f 66 |ent after one of| 00005800 20 74 68 65 73 65 20 63 61 73 65 73 20 74 6f 20 | these cases to | 00005810 73 74 61 72 74 20 6f 6e 20 61 20 6e 65 77 20 6c |start on a new l| 00005820 69 6e 65 2e 0a 0a 32 2e 31 34 20 44 41 54 41 0a |ine...2.14 DATA.| 00005830 0a 42 61 73 43 6f 6d 70 72 65 73 73 20 72 65 63 |.BasCompress rec| 00005840 6f 67 6e 69 73 65 73 20 74 68 65 20 70 6f 73 73 |ognises the poss| 00005850 69 62 69 6c 69 74 79 20 74 68 61 74 20 44 41 54 |ibility that DAT| 00005860 41 20 6d 61 79 20 6e 6f 74 20 72 65 73 69 64 65 |A may not reside| 00005870 20 69 6e 73 69 64 65 20 61 20 72 6f 75 74 69 6e | inside a routin| 00005880 65 2e 20 20 41 6c 6c 20 94 75 6e 6c 69 6e 6b 65 |e. All .unlinke| 00005890 64 95 20 44 41 54 41 20 73 74 61 74 65 6d 65 6e |d. DATA statemen| 000058a0 74 73 20 77 69 6c 6c 20 73 74 69 6c 6c 20 62 65 |ts will still be| 000058b0 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 65 | included in the| 000058c0 20 6f 75 74 70 75 74 20 66 69 6c 65 2c 20 62 75 | output file, bu| 000058d0 74 20 6f 6e 6c 79 20 69 66 20 74 68 65 72 65 20 |t only if there | 000058e0 69 73 20 73 6f 6d 65 20 63 6f 64 65 20 6c 65 66 |is some code lef| 000058f0 74 20 74 68 61 74 20 77 69 6c 6c 20 52 45 41 44 |t that will READ| 00005900 20 69 74 2e 0a 0a 50 6c 65 61 73 65 20 6e 6f 74 | it...Please not| 00005910 65 20 74 68 61 74 20 76 61 72 69 61 62 6c 65 73 |e that variables| 00005920 20 75 73 65 64 20 61 73 20 44 41 54 41 20 77 69 | used as DATA wi| 00005930 6c 6c 20 72 65 71 75 69 72 65 20 74 68 65 20 75 |ll require the u| 00005940 73 65 20 6f 66 20 53 70 65 63 69 61 6c 20 66 69 |se of Special fi| 00005950 6c 65 73 2e 0a 0a 32 2e 31 35 20 52 65 2d 63 6f |les...2.15 Re-co| 00005960 6d 70 72 65 73 73 69 6e 67 0a 0a 41 6c 74 68 6f |mpressing..Altho| 00005970 75 67 68 20 61 74 20 66 69 72 73 74 20 73 69 67 |ugh at first sig| 00005980 68 74 20 74 68 65 20 6e 6f 74 69 6f 6e 20 6f 66 |ht the notion of| 00005990 20 63 6f 6d 70 72 65 73 73 69 6e 67 20 61 6e 20 | compressing an | 000059a0 61 6c 72 65 61 64 79 20 63 6f 6d 70 72 65 73 73 |already compress| 000059b0 65 64 20 66 69 6c 65 20 6d 61 79 20 73 65 65 6d |ed file may seem| 000059c0 20 61 20 77 61 73 74 65 20 6f 66 20 74 69 6d 65 | a waste of time| 000059d0 2c 20 69 6e 20 61 63 74 75 61 6c 20 66 61 63 74 |, in actual fact| 000059e0 20 69 74 20 69 73 20 6e 6f 74 2e 0a 0a 54 68 69 | it is not...Thi| 000059f0 73 20 69 73 20 62 65 63 61 75 73 65 20 42 61 73 |s is because Bas| 00005a00 43 6f 6d 70 72 65 73 73 20 63 6f 6d 70 72 65 73 |Compress compres| 00005a10 73 65 73 20 61 20 77 68 6f 6c 65 20 6c 69 6e 65 |ses a whole line| 00005a20 20 61 74 20 61 20 74 69 6d 65 2c 20 61 6e 64 20 | at a time, and | 00005a30 74 68 65 6e 20 6d 65 72 67 65 73 20 74 6f 67 65 |then merges toge| 00005a40 74 68 65 72 20 74 77 6f 20 6f 72 20 6d 6f 72 65 |ther two or more| 00005a50 20 6c 69 6e 65 73 2e 20 20 54 68 69 73 20 69 73 | lines. This is| 00005a60 6e 27 74 20 64 6f 6e 65 20 71 75 69 74 65 20 61 |n't done quite a| 00005a70 73 20 6f 70 74 69 6d 61 6c 6c 79 20 61 73 20 70 |s optimally as p| 00005a80 6f 73 73 69 62 6c 65 2c 20 61 6e 64 20 73 6f 6d |ossible, and som| 00005a90 65 74 69 6d 65 73 20 65 78 74 72 61 20 63 6f 6c |etimes extra col| 00005aa0 6f 6e 73 20 61 72 65 20 69 6e 73 65 72 74 65 64 |ons are inserted| 00005ab0 2e 0a 0a 49 66 20 74 68 65 20 6f 75 74 70 75 74 |...If the output| 00005ac0 20 69 73 20 66 65 64 20 62 61 63 6b 20 69 6e 74 | is fed back int| 00005ad0 6f 20 42 61 73 43 6f 6d 70 72 65 73 73 20 74 68 |o BasCompress th| 00005ae0 65 73 65 20 65 78 74 72 61 20 63 6f 6c 6f 6e 73 |ese extra colons| 00005af0 20 77 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 64 | will be removed| 00005b00 2c 20 61 73 20 69 74 20 77 69 6c 6c 20 62 65 20 |, as it will be | 00005b10 6f 62 76 69 6f 75 73 20 74 68 61 74 20 74 68 65 |obvious that the| 00005b20 79 20 61 72 65 20 74 72 75 6c 79 20 72 65 64 75 |y are truly redu| 00005b30 6e 64 61 6e 74 2e 0a 0a 54 68 69 73 20 69 73 20 |ndant...This is | 00005b40 62 65 73 74 20 61 63 68 69 65 76 65 64 20 62 79 |best achieved by| 00005b50 20 66 69 72 73 74 20 63 6f 6d 70 72 65 73 73 69 | first compressi| 00005b60 6e 67 20 77 69 74 68 20 72 65 64 75 63 74 69 6f |ng with reductio| 00005b70 6e 20 6f 66 20 66 75 6e 63 74 69 6f 6e 20 61 6e |n of function an| 00005b80 64 20 70 72 6f 63 65 64 75 72 65 20 6e 61 6d 65 |d procedure name| 00005b90 73 20 6f 6e 6c 79 20 28 74 68 75 73 20 65 6e 73 |s only (thus ens| 00005ba0 75 72 69 6e 67 20 90 73 70 65 63 69 61 6c 91 20 |uring .special. | 00005bb0 72 6f 75 74 69 6e 65 73 20 6f 6e 6c 79 20 70 61 |routines only pa| 00005bc0 72 73 65 64 20 6f 6e 63 65 29 2c 20 61 6e 64 20 |rsed once), and | 00005bd0 74 68 65 6e 20 61 20 73 65 63 6f 6e 64 20 74 69 |then a second ti| 00005be0 6d 65 20 77 69 74 68 20 66 75 6c 6c 20 72 65 64 |me with full red| 00005bf0 75 63 74 69 6f 6e 20 6f 66 20 76 61 72 69 61 62 |uction of variab| 00005c00 6c 65 20 6e 61 6d 65 73 2e 0a 0a 0c 0a 0a 33 20 |le names......3 | 00005c10 43 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 69 6e |Cross-referencin| 00005c20 67 0a 0a 33 2e 31 20 4f 76 65 72 76 69 65 77 0a |g..3.1 Overview.| 00005c30 0a 54 68 65 20 63 72 6f 73 73 2d 72 65 66 65 72 |.The cross-refer| 00005c40 65 6e 63 69 6e 67 20 6f 66 20 61 20 6c 61 72 67 |encing of a larg| 00005c50 65 20 70 72 6f 67 72 61 6d 20 63 61 6e 20 70 72 |e program can pr| 00005c60 6f 76 69 64 65 20 6d 61 6e 79 20 75 73 65 66 75 |ovide many usefu| 00005c70 6c 20 69 6e 73 69 67 68 74 73 2c 20 70 72 6f 76 |l insights, prov| 00005c80 69 64 69 6e 67 20 79 6f 75 20 63 61 6e 20 6f 72 |iding you can or| 00005c90 67 61 6e 69 73 65 20 74 68 65 20 6f 75 74 70 75 |ganise the outpu| 00005ca0 74 20 73 6f 20 61 73 20 6e 6f 74 20 74 6f 20 73 |t so as not to s| 00005cb0 77 61 6d 70 20 79 6f 75 20 77 69 74 68 20 94 75 |wamp you with .u| 00005cc0 73 65 6c 65 73 73 95 20 69 6e 66 6f 72 6d 61 74 |seless. informat| 00005cd0 69 6f 6e 2e 20 20 54 6f 20 74 68 69 73 20 65 6e |ion. To this en| 00005ce0 64 20 79 6f 75 20 63 61 6e 20 63 6f 6e 74 72 6f |d you can contro| 00005cf0 6c 20 77 68 61 74 20 67 65 74 73 20 69 6e 63 6c |l what gets incl| 00005d00 75 64 65 2c 20 74 68 65 20 6c 65 76 65 6c 20 6f |ude, the level o| 00005d10 66 20 64 65 74 61 69 6c 2c 20 61 6e 64 20 74 68 |f detail, and th| 00005d20 65 20 6f 72 64 65 72 69 6e 67 20 28 77 69 74 68 |e ordering (with| 00005d30 20 6d 61 6e 79 20 74 79 70 65 73 20 6f 66 20 6f | many types of o| 00005d40 72 64 65 72 69 6e 67 20 61 76 61 69 6c 61 62 6c |rdering availabl| 00005d50 65 29 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 74 |e)...Note that t| 00005d60 68 65 20 63 72 6f 73 73 2d 72 65 66 65 72 65 6e |he cross-referen| 00005d70 63 69 6e 67 20 6f 66 20 76 61 72 69 61 62 6c 65 |cing of variable| 00005d80 73 20 61 6e 64 20 72 6f 75 74 69 6e 65 73 20 69 |s and routines i| 00005d90 73 20 63 6f 6d 70 6c 65 74 65 6c 79 20 69 6e 64 |s completely ind| 00005da0 65 70 65 6e 64 65 6e 74 2e 0a 0a 33 2e 31 2e 31 |ependent...3.1.1| 00005db0 20 57 68 61 74 27 73 20 63 72 6f 73 73 2d 72 65 | What's cross-re| 00005dc0 66 65 72 65 6e 63 65 64 0a 0a 54 68 65 20 63 72 |ferenced..The cr| 00005dd0 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 20 63 6f |oss-reference co| 00005de0 6e 74 61 69 6e 73 20 6f 6e 6c 79 20 74 68 65 20 |ntains only the | 00005df0 72 6f 75 74 69 6e 65 73 20 61 6e 64 20 76 61 72 |routines and var| 00005e00 69 61 62 6c 65 73 20 74 68 61 74 20 77 69 6c 6c |iables that will| 00005e10 20 62 65 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 | be included in | 00005e20 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 2e |the output file.| 00005e30 20 20 53 69 6e 63 65 20 64 65 61 64 20 63 6f 64 | Since dead cod| 00005e40 65 20 69 73 20 75 73 75 61 6c 6c 79 20 72 65 6d |e is usually rem| 00005e50 6f 76 65 64 2c 20 79 6f 75 20 68 61 76 65 20 74 |oved, you have t| 00005e60 6f 20 74 65 6c 6c 20 42 61 73 43 6f 6d 70 72 65 |o tell BasCompre| 00005e70 73 73 20 74 6f 20 6b 65 65 70 20 69 6e 20 61 6c |ss to keep in al| 00005e80 6c 20 77 6f 75 6c 64 2d 62 65 20 64 65 6c 65 74 |l would-be delet| 00005e90 65 64 20 73 74 75 66 66 20 69 66 20 79 6f 75 20 |ed stuff if you | 00005ea0 6e 65 65 64 20 61 20 63 6f 6d 70 6c 65 74 65 20 |need a complete | 00005eb0 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 2e |cross-reference.| 00005ec0 0a 0a 59 6f 75 20 63 61 6e 20 61 6c 73 6f 20 63 |..You can also c| 00005ed0 6f 6e 74 72 6f 6c 20 65 78 61 63 74 6c 79 20 77 |ontrol exactly w| 00005ee0 68 61 74 20 74 79 70 65 73 20 6f 66 20 6c 61 62 |hat types of lab| 00005ef0 65 6c 73 20 61 72 65 20 69 6e 63 6c 75 64 65 64 |els are included| 00005f00 2e 20 20 55 73 75 61 6c 6c 79 20 79 6f 75 27 64 |. Usually you'd| 00005f10 20 6b 65 65 70 20 74 68 65 20 64 65 66 61 75 6c | keep the defaul| 00005f20 74 20 28 65 76 65 72 79 74 68 69 6e 67 29 2c 20 |t (everything), | 00005f30 62 75 74 20 73 6f 6d 65 74 69 6d 65 73 20 79 6f |but sometimes yo| 00005f40 75 20 64 6f 6e 27 74 20 63 61 72 65 20 61 62 6f |u don't care abo| 00005f50 75 74 20 61 6c 6c 20 74 68 65 20 72 65 61 6c 20 |ut all the real | 00005f60 76 61 72 69 61 62 6c 65 73 2c 20 73 61 79 2c 20 |variables, say, | 00005f70 61 6e 64 20 74 68 69 73 20 69 73 20 65 61 73 69 |and this is easi| 00005f80 6c 79 20 63 61 74 65 72 65 64 20 66 6f 72 2e 0a |ly catered for..| 00005f90 0a 33 2e 31 2e 32 20 57 68 61 74 27 73 20 6f 75 |.3.1.2 What's ou| 00005fa0 74 70 75 74 0a 0a 54 68 65 20 72 65 73 75 6c 74 |tput..The result| 00005fb0 20 6f 66 20 74 68 65 20 63 72 6f 73 73 2d 72 65 | of the cross-re| 00005fc0 66 65 72 65 6e 63 69 6e 67 20 69 73 20 73 65 6e |ferencing is sen| 00005fd0 74 20 74 6f 20 74 68 65 20 63 72 6f 73 73 2d 72 |t to the cross-r| 00005fe0 65 66 65 72 65 6e 63 65 20 66 69 6c 65 2c 20 6f |eference file, o| 00005ff0 72 20 74 68 65 20 73 63 72 65 65 6e 20 69 66 20 |r the screen if | 00006000 6e 6f 6e 65 20 69 73 20 73 70 65 63 69 66 69 65 |none is specifie| 00006010 64 2e 20 20 53 69 6e 63 65 20 74 68 69 73 20 69 |d. Since this i| 00006020 73 20 61 20 6c 6f 74 20 6f 66 20 64 61 74 61 2c |s a lot of data,| 00006030 20 79 6f 75 20 77 69 6c 6c 20 61 6c 6d 6f 73 74 | you will almost| 00006040 20 63 65 72 74 61 69 6e 6c 79 20 77 61 6e 74 20 | certainly want | 00006050 74 6f 20 75 73 65 20 61 20 66 69 6c 65 2e 20 20 |to use a file. | 00006060 54 68 65 20 66 72 6f 6e 74 20 65 6e 64 20 61 70 |The front end ap| 00006070 70 6c 69 63 61 74 69 6f 6e 20 68 61 73 20 74 68 |plication has th| 00006080 65 20 61 62 69 6c 69 74 79 20 74 6f 20 61 75 74 |e ability to aut| 00006090 6f 6d 61 74 69 63 61 6c 6c 79 20 6c 6f 61 64 20 |omatically load | 000060a0 74 68 69 73 20 69 6e 74 6f 20 74 68 65 20 72 65 |this into the re| 000060b0 73 69 64 65 6e 74 20 74 65 78 74 20 65 64 69 74 |sident text edit| 000060c0 6f 72 2e 0a 0a 33 2e 31 2e 33 20 4d 65 73 73 61 |or...3.1.3 Messa| 000060d0 67 65 73 0a 0a 54 68 65 20 66 6f 72 6d 61 74 74 |ges..The formatt| 000060e0 69 6e 67 20 6f 66 20 74 68 65 20 63 72 6f 73 73 |ing of the cross| 000060f0 2d 72 65 66 65 72 65 6e 63 65 20 69 73 20 64 65 |-reference is de| 00006100 66 69 6e 65 64 20 75 73 69 6e 67 20 74 68 65 20 |fined using the | 00006110 65 78 74 65 72 6e 61 6c 20 4d 65 73 73 61 67 65 |external Message| 00006120 73 20 66 69 6c 65 2e 20 20 42 79 20 61 6c 74 65 |s file. By alte| 00006130 72 69 6e 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 |ring the followi| 00006140 6e 67 20 6d 65 73 73 61 67 65 73 20 79 6f 75 20 |ng messages you | 00006150 63 61 6e 20 74 61 69 6c 6f 72 20 74 68 65 20 6f |can tailor the o| 00006160 75 74 70 75 74 20 6f 66 20 74 68 65 20 70 72 6f |utput of the pro| 00006170 67 72 61 6d 20 64 72 61 6d 61 74 69 63 61 6c 6c |gram dramaticall| 00006180 79 20 28 73 65 65 20 61 70 70 65 6e 64 69 78 20 |y (see appendix | 00006190 41 20 66 6f 72 20 64 65 73 63 72 69 70 74 69 6f |A for descriptio| 000061a0 6e 20 6f 66 20 66 6f 72 6d 61 74 20 6f 66 20 6d |n of format of m| 000061b0 65 73 73 61 67 65 73 29 3a 2d 0a 0a 09 4e 61 6d |essages):-...Nam| 000061c0 65 09 53 68 6f 77 20 6c 61 62 65 6c 20 61 6e 64 |e.Show label and| 000061d0 20 69 74 73 27 20 71 75 61 6c 69 66 79 69 6e 67 | its' qualifying| 000061e0 20 73 74 72 69 6e 67 20 28 94 25 73 25 73 95 29 | string (.%s%s.)| 000061f0 0a 0a 09 43 6f 6d 6d 61 09 53 65 70 61 72 61 74 |...Comma.Separat| 00006200 65 73 20 64 69 73 74 69 6e 63 74 20 72 65 66 65 |es distinct refe| 00006210 72 65 6e 63 65 73 20 28 94 2c 20 95 29 0a 0a 09 |rences (., .)...| 00006220 53 65 6d 69 43 6f 6c 6f 6e 09 53 65 70 61 72 61 |SemiColon.Separa| 00006230 74 65 73 20 73 69 6d 69 6c 61 72 20 72 65 66 65 |tes similar refe| 00006240 72 65 6e 63 65 73 20 28 94 3b 20 95 29 0a 0a 54 |rences (.; .)..T| 00006250 68 65 79 20 61 72 65 20 63 75 72 72 65 6e 74 6c |hey are currentl| 00006260 79 20 73 65 74 20 75 70 20 74 6f 20 70 72 6f 64 |y set up to prod| 00006270 75 63 65 20 94 6f 6e 65 2d 6c 69 6e 65 2d 70 65 |uce .one-line-pe| 00006280 72 20 65 6e 74 72 79 95 2e 20 20 48 6f 77 65 76 |r entry.. Howev| 00006290 65 72 2c 20 69 74 20 69 73 20 70 6f 73 73 69 62 |er, it is possib| 000062a0 6c 65 20 74 6f 20 63 68 61 6e 67 65 20 74 68 65 |le to change the| 000062b0 73 65 20 74 68 72 65 65 20 73 6f 20 74 68 61 74 |se three so that| 000062c0 20 65 76 65 72 79 20 64 69 73 74 69 6e 63 74 20 | every distinct | 000062d0 72 65 66 65 72 65 6e 63 65 20 61 70 70 65 61 72 |reference appear| 000062e0 73 20 6f 6e 20 65 61 63 68 20 73 65 70 61 72 61 |s on each separa| 000062f0 74 65 20 6c 69 6e 65 2c 20 76 69 73 2d 61 2d 76 |te line, vis-a-v| 00006300 69 73 3a 0a 0a 09 4e 61 6d 65 3a 09 5c 6e 5c 74 |is:...Name:.\n\t| 00006310 25 73 25 73 0a 0a 09 43 6f 6d 6d 61 3a 09 5c 6e |%s%s...Comma:.\n| 00006320 5c 74 0a 0a 09 53 65 6d 69 43 6f 6c 6f 6e 3a 09 |\t...SemiColon:.| 00006330 2c 25 20 0a 0a 42 75 74 20 6e 6f 74 65 2c 20 79 |,% ..But note, y| 00006340 6f 75 20 77 69 6c 6c 20 70 72 6f 62 61 62 6c 79 |ou will probably| 00006350 20 6e 65 65 64 20 74 6f 20 61 6c 74 65 72 20 61 | need to alter a| 00006360 6c 6c 20 74 68 65 20 74 69 74 6c 65 73 20 75 73 |ll the titles us| 00006370 65 64 20 73 6f 20 74 68 61 74 20 74 68 65 79 20 |ed so that they | 00006380 73 74 61 72 74 20 72 61 74 68 65 72 20 74 68 61 |start rather tha| 00006390 6e 20 65 6e 64 20 77 69 74 68 20 61 20 6e 65 77 |n end with a new| 000063a0 6c 69 6e 65 2e 20 20 28 54 68 65 20 5c 74 20 65 |line. (The \t e| 000063b0 78 70 61 6e 64 73 20 74 6f 20 61 20 74 61 62 20 |xpands to a tab | 000063c0 63 68 61 72 61 63 74 65 72 2c 20 74 68 69 73 20 |character, this | 000063d0 69 73 20 75 73 75 61 6c 6c 79 20 62 65 74 74 65 |is usually bette| 000063e0 72 20 74 68 61 6e 20 6d 61 6e 79 20 73 70 61 63 |r than many spac| 000063f0 65 73 2c 20 73 69 6e 63 65 20 63 72 6f 73 73 2d |es, since cross-| 00006400 72 65 66 65 72 65 6e 63 65 20 66 69 6c 65 73 20 |reference files | 00006410 61 72 65 20 6c 61 72 67 65 20 65 6e 6f 75 67 68 |are large enough| 00006420 20 61 73 20 69 74 20 69 73 29 0a 0a 33 2e 32 20 | as it is)..3.2 | 00006430 4c 65 76 65 6c 20 6f 66 20 64 65 74 61 69 6c 0a |Level of detail.| 00006440 0a 54 68 65 72 65 20 61 72 65 20 66 6f 75 72 20 |.There are four | 00006450 6c 65 76 65 6c 73 20 6f 66 20 64 65 74 61 69 6c |levels of detail| 00006460 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 42 61 | supported by Ba| 00006470 73 43 6f 6d 70 72 65 73 73 3a 0a 0a 09 4e 6f 6e |sCompress:...Non| 00006480 65 09 73 75 70 70 72 65 73 73 65 73 20 6f 75 74 |e.suppresses out| 00006490 70 75 74 2c 20 6f 62 76 69 6f 75 73 20 72 65 61 |put, obvious rea| 000064a0 6c 6c 79 0a 0a 09 45 78 69 73 74 65 6e 63 65 09 |lly...Existence.| 000064b0 75 73 65 66 75 6c 20 74 6f 20 6a 75 73 74 20 6c |useful to just l| 000064c0 69 73 74 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 |ist the name of | 000064d0 61 6c 6c 20 74 68 65 20 6c 61 62 65 6c 73 20 75 |all the labels u| 000064e0 73 65 64 0a 0a 09 47 6c 6f 62 61 6c 09 67 69 76 |sed...Global.giv| 000064f0 65 73 20 74 68 65 20 61 64 64 69 74 69 6f 6e 61 |es the additiona| 00006500 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 66 |l information of| 00006510 20 61 20 63 6f 75 6e 74 20 6f 66 20 74 68 65 20 | a count of the | 00006520 6c 61 62 65 6c 20 75 73 61 67 65 0a 0a 09 52 6f |label usage...Ro| 00006530 75 74 69 6e 65 09 72 65 70 6f 72 74 73 20 6f 6e |utine.reports on| 00006540 6c 79 20 65 61 63 68 20 73 65 70 61 72 61 74 65 |ly each separate| 00006550 20 72 6f 75 74 69 6e 65 20 77 68 65 72 65 20 61 | routine where a| 00006560 20 72 65 66 65 72 65 6e 63 65 20 77 61 73 20 6d | reference was m| 00006570 61 64 65 2c 20 74 68 69 73 20 69 73 20 70 72 6f |ade, this is pro| 00006580 62 61 62 6c 79 20 74 68 65 20 6d 6f 73 74 20 75 |bably the most u| 00006590 73 65 66 75 6c 20 6f 70 74 69 6f 6e 0a 0a 09 4c |seful option...L| 000065a0 69 6e 65 09 64 65 74 61 69 6c 73 20 74 68 65 20 |ine.details the | 000065b0 65 78 61 63 74 20 73 74 61 74 65 6d 65 6e 74 20 |exact statement | 000065c0 66 6f 72 20 65 76 65 72 79 20 72 65 66 65 72 65 |for every refere| 000065d0 6e 63 65 0a 0a 46 6f 72 20 74 68 65 20 6c 61 73 |nce..For the las| 000065e0 74 20 74 77 6f 2c 20 65 61 63 68 20 6c 61 62 65 |t two, each labe| 000065f0 6c 20 68 61 73 20 73 65 70 61 72 61 74 65 20 6c |l has separate l| 00006600 69 73 74 73 2e 20 20 46 6f 72 20 72 6f 75 74 69 |ists. For routi| 00006610 6e 65 73 20 74 68 65 72 65 20 69 73 3a 20 64 65 |nes there is: de| 00006620 66 69 6e 65 64 2c 20 63 61 6c 6c 73 2c 20 63 61 |fined, calls, ca| 00006630 6c 6c 65 64 20 62 79 3b 20 61 6e 64 20 66 6f 72 |lled by; and for| 00006640 20 76 61 72 69 61 62 6c 65 73 20 74 68 65 72 65 | variables there| 00006650 20 69 73 3a 20 64 65 63 6c 61 72 65 64 2c 20 61 | is: declared, a| 00006660 73 73 69 67 6e 65 64 2c 20 61 6e 64 20 72 65 66 |ssigned, and ref| 00006670 65 72 65 6e 63 65 64 2e 0a 0a 4e 6f 74 65 20 74 |erenced...Note t| 00006680 68 61 74 20 74 68 65 20 6d 61 69 6e 20 70 72 6f |hat the main pro| 00006690 67 72 61 6d 20 69 74 73 65 6c 66 20 69 73 20 74 |gram itself is t| 000066a0 72 65 61 74 65 64 20 69 6e 74 65 72 6e 61 6c 6c |reated internall| 000066b0 79 20 61 73 20 61 20 70 72 6f 63 65 64 75 72 65 |y as a procedure| 000066c0 2c 20 61 6e 64 20 73 6f 20 61 70 70 65 61 72 73 |, and so appears| 000066d0 20 69 6e 20 74 68 65 20 72 6f 75 74 69 6e 65 20 | in the routine | 000066e0 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 2e |cross-reference.| 000066f0 0a 0a 33 2e 32 2e 31 20 52 6f 75 74 69 6e 65 20 |..3.2.1 Routine | 00006700 64 65 66 69 6e 69 74 69 6f 6e 0a 0a 54 68 69 73 |definition..This| 00006710 20 67 69 76 65 73 20 74 68 65 20 66 69 6c 65 20 | gives the file | 00006720 61 6e 64 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 |and line numbers| 00006730 20 6f 66 20 74 68 65 20 73 74 61 72 74 20 61 6e | of the start an| 00006740 64 20 65 6e 64 20 6f 66 20 74 68 65 20 72 6f 75 |d end of the rou| 00006750 74 69 6e 65 2e 0a 0a 33 2e 32 2e 32 20 52 6f 75 |tine...3.2.2 Rou| 00006760 74 69 6e 65 20 63 61 6c 6c 73 0a 0a 4c 69 73 74 |tine calls..List| 00006770 73 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 74 |s the names of t| 00006780 68 65 20 72 6f 75 74 69 6e 65 73 20 63 61 6c 6c |he routines call| 00006790 65 64 20 62 79 20 74 68 69 73 20 72 6f 75 74 69 |ed by this routi| 000067a0 6e 65 2c 20 61 6e 64 20 74 68 65 20 6c 69 6e 65 |ne, and the line| 000067b0 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 | number of the c| 000067c0 61 6c 6c 2e 0a 0a 33 2e 32 2e 33 20 52 6f 75 74 |all...3.2.3 Rout| 000067d0 69 6e 65 20 63 61 6c 6c 65 64 20 62 79 0a 0a 4c |ine called by..L| 000067e0 69 73 74 73 20 74 68 65 20 6e 61 6d 65 73 20 6f |ists the names o| 000067f0 66 20 74 68 65 20 72 6f 75 74 69 6e 65 73 20 74 |f the routines t| 00006800 68 61 74 20 63 61 6c 6c 73 20 74 68 69 73 20 72 |hat calls this r| 00006810 6f 75 74 69 6e 65 2c 20 61 6e 64 20 74 68 65 20 |outine, and the | 00006820 6c 69 6e 65 20 6e 75 6d 62 65 72 20 6f 66 20 74 |line number of t| 00006830 68 65 20 63 61 6c 6c 2e 0a 0a 49 66 20 74 68 65 |he call...If the| 00006840 20 6c 69 73 74 20 69 73 20 65 6d 70 74 79 20 74 | list is empty t| 00006850 68 65 6e 20 42 61 73 43 6f 6d 70 72 65 73 73 20 |hen BasCompress | 00006860 6b 6e 6f 77 73 20 74 68 61 74 20 74 68 69 73 20 |knows that this | 00006870 72 6f 75 74 69 6e 65 20 69 73 20 6e 6f 74 20 6e |routine is not n| 00006880 65 65 64 65 64 20 69 6e 20 74 68 65 20 6f 75 74 |eeded in the out| 00006890 70 75 74 20 70 72 6f 67 72 61 6d 2c 20 61 6e 64 |put program, and| 000068a0 20 73 6f 20 77 69 6c 6c 20 6e 6f 74 20 69 6e 63 | so will not inc| 000068b0 6c 75 64 65 20 69 74 2e 0a 0a 33 2e 32 2e 34 20 |lude it...3.2.4 | 000068c0 56 61 72 69 61 62 6c 65 20 64 65 63 6c 61 72 61 |Variable declara| 000068d0 74 69 6f 6e 0a 0a 57 68 65 72 65 20 61 20 6c 61 |tion..Where a la| 000068e0 62 65 6c 20 77 61 73 20 94 64 65 63 6c 61 72 65 |bel was .declare| 000068f0 64 95 2e 20 20 42 79 20 74 68 69 73 20 42 61 73 |d.. By this Bas| 00006900 43 6f 6d 70 72 65 73 73 20 6d 65 61 6e 73 20 69 |Compress means i| 00006910 74 20 69 73 20 61 20 66 6f 72 6d 61 6c 20 70 61 |t is a formal pa| 00006920 72 61 6d 65 74 65 72 20 6f 66 20 61 20 72 6f 75 |rameter of a rou| 00006930 74 69 6e 65 2c 20 6f 72 20 65 78 70 6c 69 63 69 |tine, or explici| 00006940 74 6c 79 20 64 65 63 6c 61 72 65 64 20 61 73 20 |tly declared as | 00006950 4c 4f 43 41 4c 2e 0a 0a 33 2e 32 2e 35 20 56 61 |LOCAL...3.2.5 Va| 00006960 72 69 61 62 6c 65 20 61 73 73 69 67 6e 6d 65 6e |riable assignmen| 00006970 74 0a 0a 57 68 65 6e 20 65 76 65 72 20 61 20 76 |t..When ever a v| 00006980 61 72 69 61 62 6c 65 20 61 70 70 65 61 72 73 20 |ariable appears | 00006990 61 74 20 74 68 65 20 73 74 61 72 74 20 6f 66 20 |at the start of | 000069a0 61 20 73 74 61 74 65 6d 65 6e 74 2e 20 20 54 68 |a statement. Th| 000069b0 69 73 20 69 6e 63 6c 75 64 65 73 20 61 73 73 65 |is includes asse| 000069c0 6d 62 6c 65 72 20 73 74 61 74 65 6d 65 6e 74 73 |mbler statements| 000069d0 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 42 61 73 |...Note that Bas| 000069e0 43 6f 6d 70 72 65 73 73 20 73 6f 6d 65 74 69 6d |Compress sometim| 000069f0 65 73 20 74 68 69 6e 6b 73 20 76 61 72 69 61 62 |es thinks variab| 00006a00 6c 65 20 61 73 73 69 67 6e 6d 65 6e 74 73 20 61 |le assignments a| 00006a10 72 65 20 72 65 66 65 72 65 6e 63 65 73 2e 20 20 |re references. | 00006a20 54 68 69 73 20 68 61 70 70 65 6e 73 20 69 6e 20 |This happens in | 00006a30 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 61 |the following ca| 00006a40 73 65 73 3a 0a 0a 09 8f 09 76 61 72 69 61 62 6c |ses:.....variabl| 00006a50 65 20 69 73 20 70 61 73 73 65 64 20 74 6f 20 61 |e is passed to a| 00006a60 20 72 6f 75 74 69 6e 65 20 77 69 74 68 20 52 45 | routine with RE| 00006a70 54 55 52 4e 20 70 61 72 61 6d 65 74 65 72 73 0a |TURN parameters.| 00006a80 0a 09 8f 09 61 73 73 69 67 6e 6d 65 6e 74 20 61 |....assignment a| 00006a90 66 74 65 72 20 61 20 6f 6e 65 2d 6c 69 6e 65 20 |fter a one-line | 00006aa0 49 46 20 74 68 61 74 20 69 73 20 77 69 74 68 6f |IF that is witho| 00006ab0 75 74 20 61 20 54 48 45 4e 0a 0a 48 65 72 65 27 |ut a THEN..Here'| 00006ac0 73 20 61 6e 20 65 78 61 6d 70 6c 65 20 6f 66 20 |s an example of | 00006ad0 74 68 65 20 6c 61 74 65 72 3a 0a 0a 09 49 46 20 |the later:...IF | 00006ae0 78 3c 79 20 78 3d 79 0a 0a 42 65 63 61 75 73 65 |x<y x=y..Because| 00006af0 20 42 61 73 63 6f 6d 70 72 65 73 73 20 64 6f 65 | Bascompress doe| 00006b00 73 6e 27 74 20 74 72 79 20 74 6f 20 75 6e 64 65 |sn't try to unde| 00006b10 72 73 74 61 6e 64 20 74 68 65 20 63 6f 6e 64 69 |rstand the condi| 00006b20 74 69 6f 6e 61 6c 2c 20 69 74 20 64 6f 65 73 6e |tional, it doesn| 00006b30 27 74 20 6b 6e 6f 77 20 74 68 61 74 20 61 20 6e |'t know that a n| 00006b40 65 77 20 73 74 61 74 65 6d 65 6e 74 20 68 61 73 |ew statement has| 00006b50 20 73 74 61 72 74 65 64 20 61 6e 64 20 73 6f 20 | started and so | 00006b60 63 61 6e 27 74 20 63 61 74 65 67 6f 72 69 73 65 |can't categorise| 00006b70 20 74 68 65 20 73 65 63 6f 6e 64 20 72 65 66 65 | the second refe| 00006b80 72 65 6e 63 65 20 74 6f 20 78 20 61 73 20 61 6e |rence to x as an| 00006b90 20 61 73 73 69 67 6e 6d 65 6e 74 2e 20 20 53 65 | assignment. Se| 00006ba0 65 20 a7 38 2e 32 2e 0a 0a 33 2e 32 2e 36 20 56 |e .8.2...3.2.6 V| 00006bb0 61 72 69 61 62 6c 65 20 72 65 66 65 72 65 6e 63 |ariable referenc| 00006bc0 65 0a 0a 41 6e 79 20 6f 74 68 65 72 20 69 6e 73 |e..Any other ins| 00006bd0 74 61 6e 63 65 20 6f 66 20 61 20 76 61 72 69 61 |tance of a varia| 00006be0 62 6c 65 20 6f 74 68 65 72 20 74 68 61 6e 20 74 |ble other than t| 00006bf0 68 65 20 61 62 6f 76 65 20 74 77 6f 20 69 73 20 |he above two is | 00006c00 74 61 6b 65 6e 20 74 6f 20 62 65 20 61 20 72 65 |taken to be a re| 00006c10 66 65 72 65 6e 63 65 2e 0a 0a 42 61 73 43 6f 6d |ference...BasCom| 00006c20 70 72 65 73 73 20 77 69 6c 6c 20 6e 6f 74 20 72 |press will not r| 00006c30 65 63 6f 67 6e 69 73 65 20 74 68 65 20 66 61 63 |ecognise the fac| 00006c40 74 20 74 68 61 74 20 78 20 2b 3d 20 31 20 69 73 |t that x += 1 is| 00006c50 20 61 63 74 75 61 6c 6c 79 20 62 6f 74 68 20 61 | actually both a| 00006c60 6e 20 61 73 73 69 67 6e 6d 65 6e 74 20 61 6e 64 |n assignment and| 00006c70 20 61 20 72 65 66 65 72 65 6e 63 65 2e 0a 0a 42 | a reference...B| 00006c80 61 73 43 6f 6d 70 72 65 73 73 20 77 69 6c 6c 20 |asCompress will | 00006c90 61 6c 73 6f 20 66 61 69 6c 20 74 6f 20 72 65 63 |also fail to rec| 00006ca0 6f 67 6e 69 73 65 20 74 68 61 74 20 76 61 72 21 |ognise that var!| 00006cb0 30 20 3d 20 31 20 6f 6e 6c 79 20 72 65 66 65 72 |0 = 1 only refer| 00006cc0 65 6e 63 65 73 20 76 61 72 20 61 6e 64 20 64 6f |ences var and do| 00006cd0 65 73 20 6e 6f 74 20 61 73 73 69 67 6e 20 74 6f |es not assign to| 00006ce0 20 69 74 2e 0a 0a 33 2e 33 20 4f 72 64 65 72 0a | it...3.3 Order.| 00006cf0 0a 54 68 65 72 65 20 61 72 65 20 6d 61 6e 79 20 |.There are many | 00006d00 75 73 65 73 20 79 6f 75 20 63 61 6e 20 70 75 74 |uses you can put| 00006d10 20 74 6f 20 61 20 6c 69 73 74 20 6f 66 20 6c 61 | to a list of la| 00006d20 62 65 6c 73 2c 20 70 72 6f 76 69 64 65 64 20 79 |bels, provided y| 00006d30 6f 75 20 63 61 6e 20 6f 72 64 65 72 20 74 68 65 |ou can order the| 00006d40 6d 20 69 6e 20 74 68 65 20 77 61 79 20 79 6f 75 |m in the way you| 00006d50 20 6e 65 65 64 2e 20 20 42 61 73 43 6f 6d 70 72 | need. BasCompr| 00006d60 65 73 73 20 61 6c 6c 6f 77 73 20 79 6f 75 20 74 |ess allows you t| 00006d70 6f 20 73 70 65 63 69 66 79 20 61 73 20 6d 61 6e |o specify as man| 00006d80 79 20 6c 65 76 65 6c 73 20 6f 66 20 73 6f 72 74 |y levels of sort| 00006d90 69 6e 67 20 61 73 20 79 6f 75 20 77 6f 75 6c 64 |ing as you would| 00006da0 20 6e 65 65 64 2c 20 77 69 74 68 20 61 6c 6c 20 | need, with all | 00006db0 74 68 65 20 74 79 70 65 73 20 6f 66 20 6f 72 64 |the types of ord| 00006dc0 65 72 69 6e 67 20 74 68 61 74 20 61 72 65 20 72 |ering that are r| 00006dd0 65 6c 65 76 61 6e 74 20 74 6f 20 74 68 65 20 6c |elevant to the l| 00006de0 61 62 65 6c 73 21 0a 0a 59 6f 75 20 63 61 6e 20 |abels!..You can | 00006df0 73 6f 72 74 20 69 6e 20 65 69 74 68 65 72 20 64 |sort in either d| 00006e00 69 72 65 63 74 69 6f 6e 20 2d 20 74 6f 70 20 74 |irection - top t| 00006e10 6f 20 62 6f 74 74 6f 6d 2c 20 6f 72 20 74 68 65 |o bottom, or the| 00006e20 20 6d 6f 72 65 20 75 73 75 61 6c 20 62 6f 74 74 | more usual bott| 00006e30 6f 6d 20 74 6f 20 74 6f 70 2e 0a 0a 54 68 65 73 |om to top...Thes| 00006e40 65 20 61 72 65 20 74 68 65 20 66 6f 6c 6c 6f 77 |e are the follow| 00006e50 69 6e 67 20 73 6f 72 74 20 74 79 70 65 73 20 63 |ing sort types c| 00006e60 75 72 72 65 6e 74 6c 79 20 73 75 70 70 6f 72 74 |urrently support| 00006e70 65 64 3a 0a 0a 09 4e 61 6d 65 09 69 6e 20 41 73 |ed:...Name.in As| 00006e80 63 69 69 20 6f 72 64 65 72 0a 0a 09 54 79 70 65 |cii order...Type| 00006e90 09 66 6f 72 20 72 6f 75 74 69 6e 65 73 3a 20 66 |.for routines: f| 00006ea0 75 6e 63 74 69 6f 6e 2c 20 70 72 6f 63 65 64 75 |unction, procedu| 00006eb0 72 65 0a 0a 09 09 09 66 6f 72 20 76 61 72 69 61 |re.....for varia| 00006ec0 62 6c 65 73 3a 20 69 6e 74 65 67 65 72 2c 20 72 |bles: integer, r| 00006ed0 65 61 6c 2c 20 73 74 72 69 6e 67 2c 20 69 6e 74 |eal, string, int| 00006ee0 65 67 65 72 20 61 72 72 61 79 2c 20 72 65 61 6c |eger array, real| 00006ef0 20 61 72 72 61 79 2c 20 73 74 72 69 6e 67 20 61 | array, string a| 00006f00 72 72 61 79 0a 0a 09 44 69 63 74 69 6f 6e 61 72 |rray...Dictionar| 00006f10 79 09 62 79 20 6e 61 6d 65 2c 20 62 75 74 20 61 |y.by name, but a| 00006f20 73 20 69 74 20 77 6f 75 6c 64 20 61 70 70 65 61 |s it would appea| 00006f30 72 20 69 6e 20 61 20 64 69 63 74 69 6f 6e 61 72 |r in a dictionar| 00006f40 79 0a 0a 09 4c 6f 63 61 74 69 6f 6e 09 74 68 65 |y...Location.the| 00006f50 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 74 68 65 | location of the| 00006f60 20 72 65 66 65 72 65 6e 63 65 0a 0a 09 55 73 61 | reference...Usa| 00006f70 67 65 09 66 6f 72 20 72 6f 75 74 69 6e 65 73 3a |ge.for routines:| 00006f80 20 6e 75 6d 62 65 72 20 6f 66 20 74 69 6d 65 73 | number of times| 00006f90 20 69 74 20 69 73 20 63 61 6c 6c 65 64 0a 0a 09 | it is called...| 00006fa0 09 09 66 6f 72 20 76 61 72 69 61 62 6c 65 73 3a |..for variables:| 00006fb0 20 73 75 6d 20 6f 66 20 74 68 65 20 61 73 73 69 | sum of the assi| 00006fc0 67 6e 6d 65 6e 74 73 20 61 6e 64 20 74 68 65 20 |gnments and the | 00006fd0 72 65 66 65 72 65 6e 63 65 73 0a 0a 4e 6f 74 65 |references..Note| 00006fe0 20 74 68 65 20 6e 65 65 64 65 64 20 66 6f 72 20 | the needed for | 00006ff0 6d 75 6c 74 69 2d 6c 65 76 65 6c 20 73 6f 72 74 |multi-level sort| 00007000 69 6e 67 2e 20 20 59 6f 75 20 77 6f 75 6c 64 20 |ing. You would | 00007010 6e 6f 72 6d 61 6c 6c 79 20 73 6f 72 74 20 6c 61 |normally sort la| 00007020 62 65 6c 73 20 62 79 20 6e 61 6d 65 2c 20 61 6e |bels by name, an| 00007030 64 20 74 79 70 65 3b 20 61 6e 64 20 72 65 66 65 |d type; and refe| 00007040 72 65 6e 63 65 73 20 62 79 20 6e 61 6d 65 2c 20 |rences by name, | 00007050 74 79 70 65 2c 20 61 6e 64 20 6c 6f 63 61 74 69 |type, and locati| 00007060 6f 6e 2e 0a 0a 54 72 79 69 6e 67 20 74 6f 20 73 |on...Trying to s| 00007070 6f 72 74 20 6c 61 62 65 6c 73 20 62 79 20 6c 6f |ort labels by lo| 00007080 63 61 74 69 6f 6e 20 68 61 73 20 6e 6f 20 6d 65 |cation has no me| 00007090 61 6e 69 6e 67 2c 20 61 6e 64 20 77 69 6c 6c 20 |aning, and will | 000070a0 72 65 73 75 6c 74 20 69 6e 20 61 20 73 65 65 6d |result in a seem| 000070b0 69 6e 67 6c 79 20 72 61 6e 64 6f 6d 20 6f 72 64 |ingly random ord| 000070c0 65 72 2e 20 20 53 6f 20 69 74 20 69 73 20 6e 6f |er. So it is no| 000070d0 74 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 6c 69 |t possible to li| 000070e0 73 74 20 72 6f 75 74 69 6e 65 73 20 69 6e 20 74 |st routines in t| 000070f0 68 65 20 6f 72 64 65 72 20 74 68 65 79 20 77 65 |he order they we| 00007100 72 65 20 64 65 66 69 6e 65 64 20 69 6e 2e 0a 0a |re defined in...| 00007110 0c 0a 0a 34 20 54 68 65 20 66 72 6f 6e 74 20 65 |...4 The front e| 00007120 6e 64 0a 0a 54 68 69 73 20 64 65 73 63 72 69 62 |nd..This describ| 00007130 65 73 20 74 68 65 20 57 69 6d 70 20 66 72 6f 6e |es the Wimp fron| 00007140 74 20 65 6e 64 20 61 70 70 6c 69 63 61 74 69 6f |t end applicatio| 00007150 6e 2e 20 20 54 68 69 73 20 61 6c 6c 6f 77 73 20 |n. This allows | 00007160 74 68 65 20 75 73 65 72 20 74 6f 20 73 65 74 20 |the user to set | 00007170 75 70 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 |up the parameter| 00007180 73 20 66 6f 72 20 74 68 65 20 62 61 63 6b 20 65 |s for the back e| 00007190 6e 64 20 70 72 6f 67 72 61 6d 20 69 6e 20 61 20 |nd program in a | 000071a0 66 72 69 65 6e 64 6c 79 20 77 61 79 2e 0a 0a 34 |friendly way...4| 000071b0 2e 31 20 53 74 61 72 74 69 6e 67 0a 0a 41 20 73 |.1 Starting..A s| 000071c0 74 61 6e 64 61 72 64 20 41 72 63 68 69 6d 65 64 |tandard Archimed| 000071d0 65 73 20 61 70 70 6c 69 63 61 74 69 6f 6e 2c 20 |es application, | 000071e0 6a 75 73 74 20 64 6f 75 62 6c 65 2d 63 6c 69 63 |just double-clic| 000071f0 6b 20 74 68 65 20 46 69 6c 65 72 20 69 63 6f 6e |k the Filer icon| 00007200 20 74 6f 20 69 6e 73 74 61 6c 6c 20 74 68 65 20 | to install the | 00007210 61 70 70 6c 69 63 61 74 69 6f 6e 20 6f 6e 74 6f |application onto| 00007220 20 74 68 65 20 69 63 6f 6e 20 62 61 72 2e 0a 0a | the icon bar...| 00007230 46 6f 72 20 66 6f 72 65 69 67 6e 20 75 73 65 72 |For foreign user| 00007240 73 2c 20 73 65 65 20 74 68 65 20 61 70 70 65 6e |s, see the appen| 00007250 64 69 78 20 41 20 64 65 73 63 72 69 62 69 6e 67 |dix A describing| 00007260 20 74 68 65 20 4d 65 73 73 61 67 65 20 66 69 6c | the Message fil| 00007270 65 20 2e 0a 0a 34 2e 32 20 4f 76 65 72 76 69 65 |e ...4.2 Overvie| 00007280 77 0a 0a 42 65 63 61 75 73 65 20 74 68 65 20 62 |w..Because the b| 00007290 61 63 6b 20 65 6e 64 20 77 6f 72 6b 73 20 6f 6e |ack end works on| 000072a0 2c 20 61 6e 64 20 70 72 6f 64 75 63 65 73 2c 20 |, and produces, | 000072b0 61 20 6e 75 6d 62 65 72 20 6f 66 20 77 68 6f 6c |a number of whol| 000072c0 65 20 66 69 6c 65 73 20 74 68 65 20 66 6f 72 6d |e files the form| 000072d0 61 74 20 6f 66 20 74 68 69 73 20 61 70 70 6c 69 |at of this appli| 000072e0 63 61 74 69 6f 6e 20 69 73 20 73 6c 69 67 68 74 |cation is slight| 000072f0 6c 79 20 75 6e 6f 72 74 68 6f 64 6f 78 2e 0a 0a |ly unorthodox...| 00007300 42 61 73 69 63 61 6c 6c 79 20 79 6f 75 20 75 73 |Basically you us| 00007310 65 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 52 |e the standard R| 00007320 69 73 63 2d 4f 73 20 6d 65 74 68 6f 64 20 6f 66 |isc-Os method of| 00007330 20 64 72 61 67 67 69 6e 67 20 66 69 6c 65 20 69 | dragging file i| 00007340 63 6f 6e 73 20 74 6f 20 46 69 6c 65 72 20 77 69 |cons to Filer wi| 00007350 6e 64 6f 77 73 20 28 74 6f 20 64 65 66 69 6e 65 |ndows (to define| 00007360 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 | the output file| 00007370 73 29 2c 20 61 6e 64 20 74 68 65 6e 20 64 72 61 |s), and then dra| 00007380 67 20 61 20 62 61 73 69 63 20 66 69 6c 65 20 6f |g a basic file o| 00007390 6e 74 6f 20 74 68 65 20 61 70 70 6c 69 63 61 74 |nto the applicat| 000073a0 69 6f 6e 20 74 6f 20 69 6e 76 6f 6b 65 20 74 68 |ion to invoke th| 000073b0 65 20 62 61 63 6b 20 65 6e 64 20 61 70 70 6c 69 |e back end appli| 000073c0 63 61 74 69 6f 6e 20 74 6f 20 63 6f 6d 70 72 65 |cation to compre| 000073d0 73 73 20 69 74 2e 20 20 54 68 69 73 20 67 65 6e |ss it. This gen| 000073e0 65 72 61 74 65 73 20 74 68 65 20 6e 65 77 20 6c |erates the new l| 000073f0 6f 67 2c 20 63 72 6f 73 73 2d 72 65 66 65 72 65 |og, cross-refere| 00007400 6e 63 65 2c 20 61 6e 64 20 6f 75 74 70 75 74 20 |nce, and output | 00007410 66 69 6c 65 73 2e 0a 0a 4e 6f 74 20 61 6c 6c 20 |files...Not all | 00007420 6f 66 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 |of the output fi| 00007430 6c 65 73 20 6e 65 65 64 20 74 6f 20 62 65 20 64 |les need to be d| 00007440 65 66 69 6e 65 64 2e 20 20 55 73 75 61 6c 6c 79 |efined. Usually| 00007450 20 74 68 65 72 65 20 69 73 20 6e 6f 20 6e 65 65 | there is no nee| 00007460 64 20 66 6f 72 20 61 20 63 72 6f 73 73 2d 72 65 |d for a cross-re| 00007470 66 65 72 65 6e 63 65 2e 20 20 42 75 74 2c 20 79 |ference. But, y| 00007480 6f 75 20 77 69 6c 6c 20 61 6c 6d 6f 73 74 20 63 |ou will almost c| 00007490 65 72 74 61 69 6e 6c 79 20 77 61 6e 74 20 74 68 |ertainly want th| 000074a0 65 20 6c 6f 67 20 66 69 6c 65 20 64 65 66 69 6e |e log file defin| 000074b0 65 64 2c 20 61 73 20 6f 74 68 65 72 77 69 73 65 |ed, as otherwise| 000074c0 20 79 6f 75 20 77 6f 75 6c 64 20 6e 6f 74 20 6b | you would not k| 000074d0 6e 6f 77 20 77 68 61 74 20 65 72 72 6f 72 73 20 |now what errors | 000074e0 6f 63 63 75 72 72 65 64 2c 20 6f 72 20 61 6e 79 |occurred, or any| 000074f0 74 68 69 6e 67 20 65 6c 73 65 2e 0a 0a 49 74 20 |thing else...It | 00007500 69 73 20 61 6c 6d 6f 73 74 20 61 20 70 72 65 2d |is almost a pre-| 00007510 72 65 71 75 69 73 69 74 65 20 74 6f 20 68 61 76 |requisite to hav| 00007520 65 20 45 64 69 74 20 72 75 6e 6e 69 6e 67 20 61 |e Edit running a| 00007530 6c 6f 6e 67 73 69 64 65 20 74 68 69 73 20 66 72 |longside this fr| 00007540 6f 6e 74 20 65 6e 64 20 69 6e 20 6f 72 64 65 72 |ont end in order| 00007550 20 66 6f 72 20 79 6f 75 20 74 6f 20 76 69 65 77 | for you to view| 00007560 20 74 68 65 20 6c 6f 67 20 74 68 61 74 20 74 68 | the log that th| 00007570 65 20 62 61 63 6b 20 65 6e 64 20 61 70 70 6c 69 |e back end appli| 00007580 63 61 74 69 6f 6e 20 70 72 6f 64 75 63 65 73 2e |cation produces.| 00007590 20 20 54 68 65 20 6c 6f 61 64 69 6e 67 20 6f 66 | The loading of| 000075a0 20 74 68 69 73 20 6c 6f 67 20 77 69 6c 6c 20 6e | this log will n| 000075b0 6f 72 6d 61 6c 6c 79 20 62 65 20 61 75 74 6f 6d |ormally be autom| 000075c0 61 74 69 63 2e 0a 0a 34 2e 32 2e 31 20 49 63 6f |atic...4.2.1 Ico| 000075d0 6e 20 62 61 72 20 69 63 6f 6e 0a 0a 54 68 65 20 |n bar icon..The | 000075e0 69 63 6f 6e 20 62 61 72 20 69 63 6f 6e 20 73 68 |icon bar icon sh| 000075f0 6f 77 73 20 73 6f 6d 65 20 6d 65 73 73 61 67 65 |ows some message| 00007600 73 20 77 68 69 6c 65 20 74 68 65 20 62 61 63 6b |s while the back| 00007610 20 65 6e 64 20 69 73 20 61 63 74 69 76 65 2e 20 | end is active. | 00007620 20 54 68 69 73 20 67 69 76 65 73 20 61 20 76 69 | This gives a vi| 00007630 73 75 61 6c 20 72 65 66 65 72 65 6e 63 65 20 74 |sual reference t| 00007640 6f 20 77 68 61 74 20 69 73 20 67 6f 69 6e 67 20 |o what is going | 00007650 6f 6e 2e 0a 0a 43 6c 69 63 6b 69 6e 67 20 53 45 |on...Clicking SE| 00007660 4c 45 43 54 20 6f 6e 20 74 68 65 20 69 63 6f 6e |LECT on the icon| 00007670 20 62 61 72 20 69 63 6f 6e 20 62 72 69 6e 67 73 | bar icon brings| 00007680 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 77 69 6e | the control win| 00007690 64 6f 77 20 74 6f 20 74 68 65 20 66 72 6f 6e 74 |dow to the front| 000076a0 20 6f 66 20 74 68 65 20 77 69 6e 64 6f 77 20 73 | of the window s| 000076b0 74 61 63 6b 2e 0a 0a 43 6c 69 63 6b 69 6e 67 20 |tack...Clicking | 000076c0 41 44 4a 55 53 54 20 69 6e 20 74 68 65 20 69 63 |ADJUST in the ic| 000076d0 6f 6e 20 62 61 72 20 69 63 6f 6e 20 72 65 2d 6c |on bar icon re-l| 000076e0 6f 61 64 73 20 74 68 65 20 6c 61 73 74 20 69 6e |oads the last in| 000076f0 70 75 74 20 66 69 6c 65 2c 20 75 73 69 6e 67 20 |put file, using | 00007700 74 68 65 20 6e 65 77 20 6f 70 74 69 6f 6e 73 2e |the new options.| 00007710 20 20 54 68 69 73 20 69 73 20 65 78 74 72 65 6d | This is extrem| 00007720 65 6c 79 20 68 61 6e 64 79 2e 0a 0a 34 2e 33 20 |ely handy...4.3 | 00007730 43 6f 6e 74 72 6f 6c 20 77 69 6e 64 6f 77 0a 0a |Control window..| 00007740 0a 0a 0a 0a 54 68 69 73 20 69 73 20 61 75 74 6f |....This is auto| 00007750 6d 61 74 69 63 61 6c 6c 79 20 6f 70 65 6e 65 64 |matically opened| 00007760 20 74 6f 20 74 68 65 20 63 65 6e 74 65 72 20 6f | to the center o| 00007770 66 20 74 68 65 20 73 63 72 65 65 6e 20 77 68 65 |f the screen whe| 00007780 6e 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f |n the applicatio| 00007790 6e 20 73 74 61 72 74 73 2e 20 20 49 74 20 61 6c |n starts. It al| 000077a0 6c 6f 77 73 20 79 6f 75 20 74 6f 20 71 75 69 63 |lows you to quic| 000077b0 6b 6c 79 20 73 65 74 20 75 70 20 61 6c 6c 20 74 |kly set up all t| 000077c0 68 65 20 66 69 6c 65 73 20 74 6f 20 62 65 20 75 |he files to be u| 000077d0 73 65 64 2c 20 61 6e 64 20 61 73 20 61 20 73 69 |sed, and as a si| 000077e0 64 65 20 65 66 66 65 63 74 20 69 74 20 67 69 76 |de effect it giv| 000077f0 65 73 20 79 6f 75 20 74 68 65 20 63 68 61 6e 63 |es you the chanc| 00007800 65 20 74 6f 20 6f 70 65 6e 20 61 20 6d 65 6e 75 |e to open a menu| 00007810 20 73 6f 6d 65 77 68 65 72 65 20 6f 74 68 65 72 | somewhere other| 00007820 20 74 68 61 6e 20 69 6e 20 74 68 65 20 62 6f 74 | than in the bot| 00007830 74 6f 6d 20 72 69 67 68 74 20 6f 66 20 74 68 65 |tom right of the| 00007840 20 73 63 72 65 65 6e 20 3a 2d 29 2e 20 20 54 68 | screen :-). Th| 00007850 65 20 6c 65 66 74 2d 6d 6f 73 74 20 74 68 72 65 |e left-most thre| 00007860 65 20 69 63 6f 6e 20 67 72 6f 75 70 73 20 61 63 |e icon groups ac| 00007870 74 20 6a 75 73 74 20 6c 69 6b 65 20 74 68 65 20 |t just like the | 00007880 73 61 76 65 20 61 73 20 64 69 61 6c 6f 67 75 65 |save as dialogue| 00007890 20 62 6f 78 65 73 20 74 6f 20 62 65 20 66 6f 75 | boxes to be fou| 000078a0 6e 64 20 6f 6e 20 74 68 65 20 6d 65 6e 75 2e 0a |nd on the menu..| 000078b0 0a 54 68 65 20 73 70 65 63 69 61 6c 20 66 69 6c |.The special fil| 000078c0 65 20 69 73 20 64 65 66 69 6e 65 64 20 62 79 20 |e is defined by | 000078d0 64 72 61 67 67 69 6e 67 20 61 20 54 65 78 74 20 |dragging a Text | 000078e0 66 69 6c 65 20 6f 6e 74 6f 20 74 68 69 73 20 77 |file onto this w| 000078f0 69 6e 64 6f 77 2e 20 20 4d 6f 72 65 20 73 70 65 |indow. More spe| 00007900 63 69 61 6c 20 66 69 6c 65 73 20 63 61 6e 20 62 |cial files can b| 00007910 65 20 64 65 66 69 6e 65 64 20 62 79 20 65 64 69 |e defined by edi| 00007920 74 69 6e 67 20 74 68 65 20 74 65 78 74 20 66 69 |ting the text fi| 00007930 65 6c 64 2c 20 61 70 70 65 6e 64 69 6e 67 20 61 |eld, appending a| 00007940 20 63 6f 6d 6d 61 20 73 65 70 61 72 61 74 65 64 | comma separated| 00007950 20 6c 69 73 74 20 6f 66 20 66 69 6c 65 20 6e 61 | list of file na| 00007960 6d 65 73 2e 0a 0a 34 2e 34 20 4d 61 69 6e 20 6d |mes...4.4 Main m| 00007970 65 6e 75 0a 0a 0a 0a 0a 0a 54 68 65 72 65 20 69 |enu......There i| 00007980 73 20 6f 6e 6c 79 20 6f 6e 65 20 6d 65 6e 75 2e |s only one menu.| 00007990 0a 0a 42 65 63 61 75 73 65 20 74 68 65 20 73 75 |..Because the su| 000079a0 62 2d 6d 65 6e 75 73 20 61 72 65 20 72 61 74 68 |b-menus are rath| 000079b0 65 72 20 6f 6e 20 74 68 65 20 6c 61 72 67 65 20 |er on the large | 000079c0 73 69 64 65 2c 20 69 74 20 69 73 20 72 65 63 6f |side, it is reco| 000079d0 6d 6d 65 6e 64 65 64 20 74 68 61 74 20 79 6f 75 |mmended that you| 000079e0 20 62 72 69 6e 67 20 74 68 65 20 6d 65 6e 75 20 | bring the menu | 000079f0 75 70 20 6f 76 65 72 20 74 68 65 20 63 6f 6e 74 |up over the cont| 00007a00 72 6f 6c 20 77 69 6e 64 6f 77 2e 20 20 54 68 69 |rol window. Thi| 00007a10 73 20 77 61 73 20 74 68 65 20 6d 61 69 6e 20 72 |s was the main r| 00007a20 65 61 73 6f 6e 20 66 6f 72 20 68 61 76 69 6e 67 |eason for having| 00007a30 20 61 20 63 6f 6e 74 72 6f 6c 20 77 69 6e 64 6f | a control windo| 00007a40 77 2c 20 61 73 20 61 20 63 6f 6e 76 65 6e 69 65 |w, as a convenie| 00007a50 6e 74 20 61 6e 63 68 6f 72 20 66 6f 72 20 74 68 |nt anchor for th| 00007a60 65 20 6d 65 6e 75 2e 0a 0a 34 2e 35 20 49 6e 70 |e menu...4.5 Inp| 00007a70 75 74 0a 0a 0a 0a 0a 0a 54 68 69 73 20 73 75 62 |ut......This sub| 00007a80 2d 6d 65 6e 75 20 64 65 66 69 6e 65 73 20 76 61 |-menu defines va| 00007a90 72 69 6f 75 73 20 70 61 72 61 6d 65 74 65 72 73 |rious parameters| 00007aa0 20 61 66 66 65 63 74 69 6e 67 20 42 61 73 43 6f | affecting BasCo| 00007ab0 6d 70 72 65 73 73 27 73 20 61 6e 61 6c 79 73 69 |mpress's analysi| 00007ac0 73 20 6f 66 20 74 68 65 20 69 6e 70 75 74 20 66 |s of the input f| 00007ad0 69 6c 65 2e 0a 0a 41 6c 6c 6f 77 20 6d 75 6c 74 |ile...Allow mult| 00007ae0 69 70 6c 79 2d 64 65 66 69 6e 65 64 20 72 6f 75 |iply-defined rou| 00007af0 74 69 6e 65 73 0a 0a 49 74 20 69 73 20 62 65 74 |tines..It is bet| 00007b00 74 65 72 20 74 6f 20 6c 65 61 76 65 20 74 68 69 |ter to leave thi| 00007b10 73 20 6f 70 74 69 6f 6e 20 75 6e 2d 74 69 63 6b |s option un-tick| 00007b20 65 64 2c 20 73 6f 20 74 68 61 74 20 69 66 20 61 |ed, so that if a| 00007b30 20 72 6f 75 74 69 6e 65 20 69 73 20 64 65 66 69 | routine is defi| 00007b40 6e 65 64 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e |ned more than on| 00007b50 63 65 20 61 6e 20 65 72 72 6f 72 20 69 73 20 67 |ce an error is g| 00007b60 65 6e 65 72 61 74 65 64 2e 20 20 54 68 69 73 20 |enerated. This | 00007b70 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 2e 0a |is the default..| 00007b80 0a 54 69 63 6b 69 6e 67 20 74 68 69 73 20 6f 70 |.Ticking this op| 00007b90 74 69 6f 6e 20 61 6c 6c 6f 77 73 20 61 20 72 6f |tion allows a ro| 00007ba0 75 74 69 6e 65 20 74 6f 20 62 65 20 64 65 66 69 |utine to be defi| 00007bb0 6e 65 64 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e |ned more than on| 00007bc0 63 65 2c 20 77 69 74 68 20 6f 6e 6c 79 20 77 61 |ce, with only wa| 00007bd0 72 6e 69 6e 67 73 20 62 65 69 6e 67 20 67 69 76 |rnings being giv| 00007be0 65 6e 2e 20 20 53 65 65 20 a7 32 2e 31 30 2e 31 |en. See .2.10.1| 00007bf0 2e 0a 0a 52 65 70 6f 72 74 20 6d 75 6c 74 69 70 |...Report multip| 00007c00 6c 65 20 65 78 69 74 73 20 66 72 6f 6d 20 61 20 |le exits from a | 00007c10 72 6f 75 74 69 6e 65 0a 0a 42 61 73 43 6f 6d 70 |routine..BasComp| 00007c20 72 65 73 73 20 6e 65 65 64 73 20 74 6f 20 6b 6e |ress needs to kn| 00007c30 6f 77 20 77 68 65 6e 20 65 61 63 68 20 61 6e 64 |ow when each and| 00007c40 20 65 76 65 72 79 20 72 6f 75 74 69 6e 65 20 65 | every routine e| 00007c50 6e 64 73 2e 20 20 49 66 20 69 74 20 66 69 6e 64 |nds. If it find| 00007c60 73 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 20 |s more than one | 00007c70 65 78 69 74 20 69 74 20 77 69 6c 6c 20 72 65 70 |exit it will rep| 00007c80 6f 72 74 20 69 74 2e 20 20 46 6f 72 20 6c 61 72 |ort it. For lar| 00007c90 67 65 20 70 72 6f 67 72 61 6d 73 20 74 68 69 73 |ge programs this| 00007ca0 20 63 61 6e 20 70 72 6f 64 75 63 65 20 6d 61 6e | can produce man| 00007cb0 79 20 77 61 72 6e 69 6e 67 73 2c 20 61 6e 64 20 |y warnings, and | 00007cc0 73 6f 20 74 68 65 73 65 20 77 61 72 6e 69 6e 67 |so these warning| 00007cd0 73 20 63 61 6e 20 62 65 20 64 69 73 61 62 6c 65 |s can be disable| 00007ce0 64 2e 20 20 53 65 65 20 a7 32 2e 38 2e 33 2e 0a |d. See .2.8.3..| 00007cf0 0a 50 61 72 73 65 20 6e 75 6d 62 65 72 73 0a 0a |.Parse numbers..| 00007d00 54 68 69 73 20 74 6f 67 67 6c 65 73 20 77 68 65 |This toggles whe| 00007d10 74 68 65 72 20 42 61 73 43 6f 6d 70 72 65 73 73 |ther BasCompress| 00007d20 20 77 69 6c 6c 20 74 72 79 20 74 6f 20 72 65 64 | will try to red| 00007d30 75 63 65 20 61 20 73 74 72 69 6e 67 20 6f 66 20 |uce a string of | 00007d40 64 65 63 69 6d 61 6c 20 64 69 67 69 74 73 2e 20 |decimal digits. | 00007d50 20 48 65 78 61 64 65 63 69 6d 61 6c 20 61 6e 64 | Hexadecimal and| 00007d60 20 62 69 6e 61 72 79 20 6e 75 6d 62 65 72 73 20 | binary numbers | 00007d70 61 72 65 20 61 6c 77 61 79 73 20 63 6f 6d 70 72 |are always compr| 00007d80 65 73 73 65 64 2e 20 20 53 65 65 20 a7 32 2e 34 |essed. See .2.4| 00007d90 2e 0a 0a 43 6f 6e 76 65 72 74 20 53 57 49 73 20 |...Convert SWIs | 00007da0 74 6f 20 6e 75 6d 62 65 72 73 0a 0a 54 68 65 72 |to numbers..Ther| 00007db0 65 20 64 6f 65 73 6e 27 74 20 61 70 70 65 61 72 |e doesn't appear| 00007dc0 20 74 6f 20 62 65 20 61 6e 79 20 72 65 61 73 6f | to be any reaso| 00007dd0 6e 20 74 6f 20 64 69 73 61 62 6c 65 20 74 68 69 |n to disable thi| 00007de0 73 2e 20 20 53 65 65 20 a7 32 2e 35 2e 0a 0a 46 |s. See .2.5...F| 00007df0 6f 72 63 65 20 6d 61 6c 66 6f 72 6d 65 64 20 53 |orce malformed S| 00007e00 57 49 27 73 20 74 6f 20 67 65 6e 65 72 61 74 65 |WI's to generate| 00007e10 20 65 72 72 6f 72 0a 0a 4d 61 6c 66 6f 72 6d 65 | error..Malforme| 00007e20 64 20 53 57 49 27 73 20 61 72 65 20 74 68 6f 73 |d SWI's are thos| 00007e30 65 20 74 68 61 74 20 61 72 65 6e 27 74 20 73 69 |e that aren't si| 00007e40 6d 70 6c 65 20 73 74 72 69 6e 67 73 2c 20 65 2e |mple strings, e.| 00007e50 67 2e 20 22 58 22 2b 20 22 57 69 6d 70 5f 50 6f |g. "X"+ "Wimp_Po| 00007e60 6c 6c 22 2e 20 20 57 69 74 68 20 74 68 69 73 20 |ll". With this | 00007e70 65 6e 61 62 6c 65 64 20 74 68 65 73 65 20 67 65 |enabled these ge| 00007e80 6e 65 72 61 74 65 20 61 6e 20 65 72 72 6f 72 2c |nerate an error,| 00007e90 20 6f 74 68 65 72 77 69 73 65 20 6a 75 73 74 20 | otherwise just | 00007ea0 61 20 77 61 72 6e 69 6e 67 2e 20 20 53 65 65 20 |a warning. See | 00007eb0 a7 32 2e 35 2e 0a 0a 52 65 70 6f 72 74 20 75 6e |.2.5...Report un| 00007ec0 6b 6e 6f 77 6e 20 53 57 49 27 73 0a 0a 49 6e 20 |known SWI's..In | 00007ed0 6f 72 64 65 72 20 66 6f 72 20 42 61 73 43 6f 6d |order for BasCom| 00007ee0 70 72 65 73 73 20 74 6f 20 63 6f 6e 76 65 72 74 |press to convert| 00007ef0 20 61 20 53 57 49 20 73 74 72 69 6e 67 20 74 6f | a SWI string to| 00007f00 20 61 20 6e 75 6d 62 65 72 20 74 68 65 20 4d 6f | a number the Mo| 00007f10 64 75 6c 65 20 6d 75 73 74 20 62 65 20 72 65 73 |dule must be res| 00007f20 69 64 65 6e 74 20 61 74 20 74 68 65 20 74 69 6d |ident at the tim| 00007f30 65 20 6f 66 20 63 6f 6d 70 72 65 73 73 69 6f 6e |e of compression| 00007f40 2e 20 20 49 66 20 74 68 65 20 6d 6f 64 75 6c 65 |. If the module| 00007f50 20 69 73 20 6e 6f 74 20 72 65 73 69 64 65 6e 74 | is not resident| 00007f60 2c 20 74 68 65 6e 20 74 68 69 73 20 77 61 72 6e |, then this warn| 00007f70 69 6e 67 20 77 69 6c 6c 20 62 65 20 67 69 76 65 |ing will be give| 00007f80 6e 2e 20 20 54 68 69 73 20 74 6f 67 67 6c 65 73 |n. This toggles| 00007f90 20 74 68 65 20 61 70 70 65 61 72 61 6e 63 65 20 | the appearance | 00007fa0 6f 66 20 73 75 63 68 20 77 61 72 6e 69 6e 67 73 |of such warnings| 00007fb0 2c 20 61 6e 64 20 69 73 20 75 73 75 61 6c 6c 79 |, and is usually| 00007fc0 20 6c 65 66 74 20 65 6e 61 62 6c 65 64 2e 20 20 | left enabled. | 00007fd0 53 65 65 20 a7 32 2e 35 2e 0a 0a 50 72 6f 63 65 |See .2.5...Proce| 00007fe0 73 73 20 61 73 20 61 20 6c 69 62 72 61 72 79 20 |ss as a library | 00007ff0 66 69 6c 65 0a 0a 54 68 69 73 20 6f 70 74 69 6f |file..This optio| 00008000 6e 20 61 6c 6c 6f 77 73 20 74 68 65 20 69 6e 70 |n allows the inp| 00008010 75 74 20 66 69 6c 65 20 74 6f 20 62 65 20 74 72 |ut file to be tr| 00008020 65 61 74 65 64 20 61 73 20 61 20 6c 69 62 72 61 |eated as a libra| 00008030 72 79 20 66 69 6c 65 2e 20 20 54 68 69 73 20 6d |ry file. This m| 00008040 65 61 6e 73 20 74 68 61 74 20 6e 6f 20 6d 61 69 |eans that no mai| 00008050 6e 20 70 72 6f 67 72 61 6d 20 69 73 20 65 78 70 |n program is exp| 00008060 65 63 74 65 64 2c 20 61 6e 64 20 61 6e 79 20 75 |ected, and any u| 00008070 6e 64 65 66 69 6e 65 64 20 76 61 72 69 61 62 6c |ndefined variabl| 00008080 65 73 20 61 6e 64 20 72 6f 75 74 69 6e 65 73 20 |es and routines | 00008090 64 6f 20 6e 6f 74 20 67 65 6e 65 72 61 74 65 20 |do not generate | 000080a0 61 6e 20 65 72 72 6f 72 2e 20 20 4f 66 20 63 6f |an error. Of co| 000080b0 75 72 73 65 2c 20 75 73 69 6e 67 20 74 68 69 73 |urse, using this| 000080c0 20 6f 70 74 69 6f 6e 20 69 73 20 75 73 75 61 6c | option is usual| 000080d0 6c 79 20 70 6f 69 6e 74 6c 65 73 73 20 77 69 74 |ly pointless wit| 000080e0 68 6f 75 74 20 61 6c 73 6f 20 64 69 73 61 62 6c |hout also disabl| 000080f0 69 6e 67 20 61 6c 6c 20 6c 61 62 65 6c 20 72 65 |ing all label re| 00008100 64 75 63 74 69 6f 6e 73 2e 0a 0a 34 2e 36 20 4f |ductions...4.6 O| 00008110 75 74 70 75 74 0a 0a 0a 0a 0a 0a 54 68 69 73 20 |utput......This | 00008120 73 75 62 2d 6d 65 6e 75 20 61 6c 6c 6f 77 73 20 |sub-menu allows | 00008130 79 6f 75 20 74 6f 20 74 61 69 6c 6f 72 20 68 6f |you to tailor ho| 00008140 77 20 6d 75 63 68 20 63 6f 6d 70 72 65 73 73 69 |w much compressi| 00008150 6f 6e 20 69 73 20 61 70 70 6c 69 65 64 20 74 6f |on is applied to| 00008160 20 74 68 65 20 6f 75 74 70 75 74 20 70 72 6f 67 | the output prog| 00008170 72 61 6d 73 2e 20 20 52 65 64 75 6e 64 61 6e 74 |rams. Redundant| 00008180 20 73 70 61 63 65 73 20 61 6e 64 20 63 6f 6d 6d | spaces and comm| 00008190 65 6e 74 73 20 61 72 65 20 61 6c 77 61 79 73 20 |ents are always | 000081a0 72 65 6d 6f 76 65 64 2c 20 73 69 6e 63 65 20 74 |removed, since t| 000081b0 68 65 72 65 20 73 65 65 6d 73 20 6c 69 74 74 6c |here seems littl| 000081c0 65 20 70 6f 69 6e 74 20 69 6e 20 75 73 69 6e 67 |e point in using| 000081d0 20 62 61 53 63 6f 6d 70 72 65 73 73 20 77 69 74 | baScompress wit| 000081e0 68 6f 75 74 20 64 6f 69 6e 67 20 74 68 69 73 2e |hout doing this.| 000081f0 0a 0a 42 79 20 64 65 66 61 75 6c 74 20 61 6c 6c |..By default all| 00008200 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 69 73 20 | compression is | 00008210 6f 6e 2e 0a 0a 53 61 76 65 20 61 73 0a 0a 54 68 |on...Save as..Th| 00008220 69 73 20 6c 65 61 64 73 20 74 6f 20 61 20 73 74 |is leads to a st| 00008230 61 6e 64 61 72 64 20 64 69 61 6c 6f 67 75 65 20 |andard dialogue | 00008240 62 6f 78 2c 20 75 73 65 64 20 74 6f 20 64 65 66 |box, used to def| 00008250 69 6e 65 20 74 68 65 20 62 61 73 69 63 20 66 69 |ine the basic fi| 00008260 6c 65 20 74 68 61 74 20 77 69 6c 6c 20 62 65 20 |le that will be | 00008270 70 72 6f 64 75 63 65 64 20 69 66 20 74 68 65 20 |produced if the | 00008280 69 6e 70 75 74 20 69 73 20 61 6e 61 6c 79 73 65 |input is analyse| 00008290 64 20 77 69 74 68 6f 75 74 20 65 72 72 6f 72 2e |d without error.| 000082a0 0a 0a 43 6f 6e 63 61 74 65 6e 61 74 65 20 6c 69 |..Concatenate li| 000082b0 6e 65 73 0a 0a 46 6f 72 63 65 73 20 61 73 20 6d |nes..Forces as m| 000082c0 61 6e 79 20 73 74 61 74 65 6d 65 6e 74 73 20 61 |any statements a| 000082d0 73 20 70 6f 73 73 69 62 6c 65 20 6f 6e 74 6f 20 |s possible onto | 000082e0 65 61 63 68 20 6f 75 74 70 75 74 20 6c 69 6e 65 |each output line| 000082f0 2e 20 20 54 68 69 73 20 69 73 20 75 73 75 61 6c |. This is usual| 00008300 6c 79 20 76 65 72 79 20 64 65 73 69 72 61 62 6c |ly very desirabl| 00008310 65 20 61 73 20 69 74 20 70 72 6f 64 75 63 65 73 |e as it produces| 00008320 20 71 75 69 74 65 20 73 75 62 73 74 61 6e 74 69 | quite substanti| 00008330 61 6c 6c 79 20 73 68 6f 72 74 65 72 20 63 6f 64 |ally shorter cod| 00008340 65 2c 20 62 75 74 20 61 74 20 74 68 65 20 70 6f |e, but at the po| 00008350 73 73 69 62 6c 65 20 6c 6f 73 73 20 6f 66 20 61 |ssible loss of a| 00008360 20 62 69 74 20 6f 66 20 65 78 65 63 75 74 69 6f | bit of executio| 00008370 6e 20 73 70 65 65 64 2e 20 20 53 65 65 20 a7 32 |n speed. See .2| 00008380 2e 31 33 2e 0a 0a 52 65 6d 6f 76 65 20 75 6e 75 |.13...Remove unu| 00008390 73 65 64 20 72 6f 75 74 69 6e 65 73 0a 0a 42 65 |sed routines..Be| 000083a0 63 61 75 73 65 20 42 61 73 43 6f 6d 70 72 65 73 |cause BasCompres| 000083b0 73 20 63 61 6e 20 77 6f 72 6b 20 6f 75 74 20 65 |s can work out e| 000083c0 78 61 63 74 6c 79 20 77 68 69 63 68 20 72 6f 75 |xactly which rou| 000083d0 74 69 6e 65 73 20 61 72 65 2c 20 61 6e 64 20 61 |tines are, and a| 000083e0 72 65 20 6e 6f 74 20 6e 65 65 64 65 64 20 69 6e |re not needed in| 000083f0 20 74 68 65 20 66 69 6e 61 6c 20 70 72 6f 67 72 | the final progr| 00008400 61 6d 2c 20 74 68 65 6e 20 69 74 20 63 61 6e 20 |am, then it can | 00008410 72 65 6d 6f 76 65 20 75 6e 75 73 65 64 20 72 6f |remove unused ro| 00008420 75 74 69 6e 65 73 2e 20 20 54 68 69 73 20 69 73 |utines. This is| 00008430 20 74 68 65 20 64 65 66 61 75 6c 74 2c 20 61 6e | the default, an| 00008440 64 20 74 68 65 72 65 20 69 73 20 6c 69 74 74 6c |d there is littl| 00008450 65 20 70 6f 69 6e 74 20 69 6e 20 64 69 73 61 62 |e point in disab| 00008460 6c 69 6e 67 20 69 74 2c 20 6f 74 68 65 72 20 74 |ling it, other t| 00008470 68 61 6e 20 63 72 65 61 74 69 6e 67 20 61 20 66 |han creating a f| 00008480 75 6c 6c 20 63 72 6f 73 73 2d 72 65 66 65 72 65 |ull cross-refere| 00008490 6e 63 65 2e 0a 0a 4c 69 73 74 0a 0a 54 68 69 73 |nce...List..This| 000084a0 20 6c 65 61 64 73 20 74 6f 20 61 20 73 69 6d 70 | leads to a simp| 000084b0 6c 65 20 73 75 62 2d 6d 65 6e 75 20 77 68 65 72 |le sub-menu wher| 000084c0 65 20 79 6f 75 20 63 61 6e 20 73 70 65 63 69 66 |e you can specif| 000084d0 79 20 74 68 65 20 73 63 72 65 65 6e 20 6d 6f 64 |y the screen mod| 000084e0 65 20 74 6f 20 75 73 65 2e 20 20 57 68 65 6e 20 |e to use. When | 000084f0 65 6e 61 62 6c 65 64 2c 20 61 73 20 42 61 73 43 |enabled, as BasC| 00008500 6f 6d 70 72 65 73 73 20 70 72 6f 64 75 63 65 73 |ompress produces| 00008510 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 | the output file| 00008520 20 69 74 20 77 69 6c 6c 20 73 77 69 74 63 68 20 | it will switch | 00008530 74 6f 20 74 68 61 74 20 73 63 72 65 65 6e 20 6d |to that screen m| 00008540 6f 64 65 20 61 6e 64 20 73 63 72 6f 6c 6c 20 74 |ode and scroll t| 00008550 68 65 20 73 6f 75 72 63 65 20 61 6e 64 20 6f 75 |he source and ou| 00008560 74 70 75 74 20 69 6e 20 74 77 6f 20 73 65 70 61 |tput in two sepa| 00008570 72 61 74 65 20 63 6f 6c 75 6d 6e 73 2e 20 20 41 |rate columns. A| 00008580 6c 74 68 6f 75 67 68 20 22 70 72 65 74 74 79 22 |lthough "pretty"| 00008590 2c 20 69 74 20 69 73 20 61 6c 73 6f 20 70 72 65 |, it is also pre| 000085a0 74 74 79 20 75 73 65 6c 65 73 73 2c 20 61 73 20 |tty useless, as | 000085b0 74 68 69 73 20 74 61 6b 65 73 20 61 74 20 6c 65 |this takes at le| 000085c0 61 73 74 20 61 6e 20 6f 72 64 65 72 20 6f 66 20 |ast an order of | 000085d0 6d 61 67 6e 69 74 75 64 65 20 6c 6f 6e 67 65 72 |magnitude longer| 000085e0 20 74 6f 20 64 6f 2c 20 77 68 61 74 20 77 69 74 | to do, what wit| 000085f0 68 20 61 6c 6c 20 74 68 61 74 20 73 63 72 65 65 |h all that scree| 00008600 6e 20 73 63 72 6f 6c 6c 69 6e 67 20 61 6e 64 20 |n scrolling and | 00008610 70 72 69 6e 74 69 6e 67 2e 0a 0a 52 65 64 75 63 |printing...Reduc| 00008620 65 20 76 61 72 69 61 62 6c 65 20 6e 61 6d 65 73 |e variable names| 00008630 0a 0a 0a 0a 0a 0a 42 79 20 64 65 66 61 75 6c 74 |......By default| 00008640 2c 20 61 6c 6c 20 76 61 72 69 61 62 6c 65 20 74 |, all variable t| 00008650 79 70 65 73 20 61 72 65 20 72 65 64 75 63 65 64 |ypes are reduced| 00008660 2e 20 20 54 68 65 20 6f 6e 6c 79 20 63 6f 6e 63 |. The only conc| 00008670 65 69 76 61 62 6c 65 20 75 73 65 20 66 6f 72 20 |eivable use for | 00008680 64 69 73 61 62 6c 69 6e 67 20 74 68 65 20 72 65 |disabling the re| 00008690 64 75 63 74 69 6f 6e 20 6f 66 20 74 68 65 73 65 |duction of these| 000086a0 20 77 6f 75 6c 64 20 62 65 20 74 6f 20 63 69 72 | would be to cir| 000086b0 63 75 6d 76 65 6e 74 20 74 68 65 20 75 73 65 20 |cumvent the use | 000086c0 6f 66 20 45 56 41 4c 20 6f 72 20 44 41 54 41 20 |of EVAL or DATA | 000086d0 76 61 72 69 61 62 6c 65 73 2c 20 61 6c 74 68 6f |variables, altho| 000086e0 75 67 68 20 42 61 73 43 6f 6d 70 72 65 73 73 20 |ugh BasCompress | 000086f0 70 72 6f 76 69 64 65 73 20 61 20 6d 75 63 68 20 |provides a much | 00008700 62 65 74 74 65 72 20 6d 65 74 68 6f 64 2c 20 76 |better method, v| 00008710 69 61 20 74 68 65 20 75 73 65 20 6f 66 20 53 70 |ia the use of Sp| 00008720 65 63 69 61 6c 20 66 69 6c 65 73 2e 20 20 53 65 |ecial files. Se| 00008730 65 20 a7 32 2e 31 31 2e 0a 0a 54 68 65 20 66 69 |e .2.11...The fi| 00008740 6e 61 6c 20 6f 70 74 69 6f 6e 2c 20 90 45 91 20 |nal option, .E. | 00008750 73 75 70 70 72 65 73 73 69 6f 6e 20 69 73 20 75 |suppression is u| 00008760 73 65 64 20 74 6f 20 73 74 6f 70 20 42 61 73 43 |sed to stop BasC| 00008770 6f 6d 70 72 65 73 73 20 73 68 6f 72 74 65 6e 69 |ompress shorteni| 00008780 6e 67 20 61 6e 79 20 76 61 72 69 61 62 6c 65 73 |ng any variables| 00008790 20 74 6f 20 61 20 6e 61 6d 65 20 62 65 67 69 6e | to a name begin| 000087a0 6e 69 6e 67 20 77 69 74 68 20 61 6e 20 90 45 91 |ning with an .E.| 000087b0 2e 20 20 46 6f 72 20 74 68 65 20 72 65 61 73 6f |. For the reaso| 000087c0 6e 20 77 68 79 20 74 68 69 73 20 6d 69 67 68 74 |n why this might| 000087d0 20 62 65 20 64 65 73 69 72 61 62 6c 65 2c 20 73 | be desirable, s| 000087e0 65 65 20 a7 38 2e 31 32 2e 0a 0a 52 65 64 75 63 |ee .8.12...Reduc| 000087f0 65 20 72 6f 75 74 69 6e 65 20 6e 61 6d 65 73 0a |e routine names.| 00008800 0a 0a 0a 0a 0a 42 79 20 64 65 66 61 75 6c 74 2c |.....By default,| 00008810 20 61 6c 6c 20 70 72 6f 63 65 64 75 72 65 20 61 | all procedure a| 00008820 6e 64 20 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 |nd function name| 00008830 73 20 61 72 65 20 72 65 64 75 63 65 64 2e 20 20 |s are reduced. | 00008840 54 68 65 20 6f 6e 6c 79 20 63 6f 6e 63 65 69 76 |The only conceiv| 00008850 61 62 6c 65 20 75 73 65 20 66 6f 72 20 64 69 73 |able use for dis| 00008860 61 62 6c 69 6e 67 20 74 68 65 20 72 65 64 75 63 |abling the reduc| 00008870 74 69 6f 6e 20 6f 66 20 74 68 65 73 65 20 77 6f |tion of these wo| 00008880 75 6c 64 20 62 65 20 74 6f 20 63 69 72 63 75 6d |uld be to circum| 00008890 76 65 6e 74 20 74 68 65 20 75 73 65 20 6f 66 20 |vent the use of | 000088a0 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 73 20 75 |function names u| 000088b0 73 65 64 20 69 6e 73 69 64 65 20 61 6e 20 45 56 |sed inside an EV| 000088c0 41 4c 20 63 6f 6e 73 74 72 75 63 74 2c 20 61 6c |AL construct, al| 000088d0 74 68 6f 75 67 68 20 42 61 73 43 6f 6d 70 72 65 |though BasCompre| 000088e0 73 73 20 70 72 6f 76 69 64 65 73 20 61 20 6d 75 |ss provides a mu| 000088f0 63 68 20 62 65 74 74 65 72 20 6d 65 74 68 6f 64 |ch better method| 00008900 20 74 6f 20 68 61 6e 64 6c 65 20 74 68 69 73 2c | to handle this,| 00008910 20 76 69 61 20 74 68 65 20 75 73 65 20 6f 66 20 | via the use of | 00008920 53 70 65 63 69 61 6c 20 66 69 6c 65 73 2e 0a 0a |Special files...| 00008930 34 2e 37 20 4c 6f 67 0a 0a 0a 0a 0a 0a 54 68 65 |4.7 Log......The| 00008940 20 6c 6f 67 20 73 75 62 2d 6d 65 6e 75 20 63 6f | log sub-menu co| 00008950 6e 74 72 6f 6c 73 20 77 68 61 74 20 61 64 64 69 |ntrols what addi| 00008960 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 |tional informati| 00008970 6f 6e 20 6d 61 79 20 62 65 20 69 6e 73 65 72 74 |on may be insert| 00008980 65 64 20 69 6e 74 6f 20 74 68 65 20 6c 6f 67 20 |ed into the log | 00008990 66 69 6c 65 2c 20 61 6c 6f 6e 67 20 77 69 74 68 |file, along with| 000089a0 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 61 6c 6c | the name of all| 000089b0 20 66 69 6c 65 73 20 73 63 61 6e 6e 65 64 20 61 | files scanned a| 000089c0 6e 64 20 61 6e 79 20 77 61 72 6e 69 6e 67 73 20 |nd any warnings | 000089d0 61 6e 64 20 65 72 72 6f 72 73 2e 0a 0a 53 61 76 |and errors...Sav| 000089e0 65 20 61 73 0a 0a 54 68 69 73 20 6c 65 61 64 73 |e as..This leads| 000089f0 20 74 6f 20 61 20 73 74 61 6e 64 61 72 64 20 73 | to a standard s| 00008a00 61 76 65 20 61 73 20 64 69 61 6c 6f 67 75 65 20 |ave as dialogue | 00008a10 62 6f 78 2c 20 75 73 65 64 20 74 6f 20 64 65 66 |box, used to def| 00008a20 69 6e 65 20 74 68 65 20 66 69 6c 65 20 74 6f 20 |ine the file to | 00008a30 77 68 69 63 68 20 74 68 65 20 6c 6f 67 20 77 69 |which the log wi| 00008a40 6c 6c 20 62 65 20 64 75 6d 70 65 64 2e 20 20 54 |ll be dumped. T| 00008a50 68 69 73 20 77 69 6c 6c 20 62 65 20 61 20 73 74 |his will be a st| 00008a60 61 6e 64 61 72 64 20 54 65 78 74 20 66 69 6c 65 |andard Text file| 00008a70 2e 0a 0a 0a 0a 53 74 61 74 69 73 74 69 63 73 0a |.....Statistics.| 00008a80 0a 54 68 69 73 20 73 68 6f 77 73 20 68 6f 77 20 |.This shows how | 00008a90 6d 61 6e 79 20 6f 66 20 65 61 63 68 20 74 79 70 |many of each typ| 00008aa0 65 20 6f 66 20 76 61 72 69 61 62 6c 65 20 61 6e |e of variable an| 00008ab0 64 20 72 6f 75 74 69 6e 65 20 74 68 65 72 65 20 |d routine there | 00008ac0 69 73 20 61 6c 74 6f 67 65 74 68 65 72 20 69 6e |is altogether in| 00008ad0 20 74 68 65 20 70 72 6f 67 72 61 6d 2e 20 20 54 | the program. T| 00008ae0 68 69 73 20 69 6e 63 6c 75 64 65 73 20 61 6c 6c |his includes all| 00008af0 20 64 65 6c 65 74 65 64 20 6c 61 62 65 6c 73 2e | deleted labels.| 00008b00 0a 0a 0a 0a 45 56 41 4c 20 6b 65 79 77 6f 72 64 |....EVAL keyword| 00008b10 0a 0a 44 41 54 41 20 6b 65 79 77 6f 72 64 0a 0a |..DATA keyword..| 00008b20 52 45 41 44 20 6b 65 79 77 6f 72 64 0a 0a 54 68 |READ keyword..Th| 00008b30 65 73 65 20 77 69 6c 6c 20 6c 69 73 74 20 6f 75 |ese will list ou| 00008b40 74 20 65 76 65 72 79 20 6c 69 6e 65 20 74 68 61 |t every line tha| 00008b50 74 20 63 6f 6e 74 61 69 6e 73 20 73 75 63 68 20 |t contains such | 00008b60 61 20 6b 65 79 77 6f 72 64 2c 20 69 6e 64 69 63 |a keyword, indic| 00008b70 61 74 69 6e 67 20 77 68 65 72 65 20 42 61 73 43 |ating where BasC| 00008b80 6f 6d 70 72 65 73 73 20 6d 61 79 20 69 6e 74 72 |ompress may intr| 00008b90 6f 64 75 63 65 20 65 72 72 6f 72 73 20 62 65 63 |oduce errors bec| 00008ba0 61 75 73 65 20 6f 66 20 69 74 73 27 20 72 65 64 |ause of its' red| 00008bb0 75 63 74 69 6f 6e 20 6f 66 20 6c 61 62 65 6c 73 |uction of labels| 00008bc0 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 6f 6e 6c |. Note that onl| 00008bd0 79 20 74 68 65 20 75 73 65 20 6f 66 20 74 68 65 |y the use of the| 00008be0 73 65 20 6b 65 79 77 6f 72 64 73 20 6f 75 74 73 |se keywords outs| 00008bf0 69 64 65 20 73 70 65 63 69 61 6c 20 72 6f 75 74 |ide special rout| 00008c00 69 6e 65 73 20 69 73 20 72 65 70 6f 72 74 65 64 |ines is reported| 00008c10 2c 20 61 73 20 69 74 20 69 73 20 61 73 73 75 6d |, as it is assum| 00008c20 65 64 20 74 68 65 20 75 73 65 20 6f 66 20 74 68 |ed the use of th| 00008c30 65 20 6b 65 79 77 6f 72 64 20 77 61 73 20 66 75 |e keyword was fu| 00008c40 6c 6c 79 20 68 61 6e 64 6c 65 64 20 62 79 20 74 |lly handled by t| 00008c50 68 65 20 53 70 65 63 69 61 6c 20 66 69 6c 65 2e |he Special file.| 00008c60 20 20 46 75 72 74 68 65 72 20 6e 6f 74 65 20 74 | Further note t| 00008c70 68 61 74 20 44 41 54 41 20 66 6f 75 6e 64 20 6f |hat DATA found o| 00008c80 75 74 73 69 64 65 20 61 6e 79 20 72 6f 75 74 69 |utside any routi| 00008c90 6e 65 20 69 73 20 6a 75 73 74 20 72 65 70 6f 72 |ne is just repor| 00008ca0 74 65 64 20 61 73 20 75 6e 6c 69 6e 6b 65 64 2e |ted as unlinked.| 00008cb0 0a 0a 4c 69 73 74 20 69 6e 70 75 74 0a 0a 57 69 |..List input..Wi| 00008cc0 74 68 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 74 |th this option t| 00008cd0 69 63 6b 65 64 2c 20 74 68 65 20 69 6e 70 75 74 |icked, the input| 00008ce0 20 62 61 73 69 63 20 69 73 20 61 6c 73 6f 20 6c | basic is also l| 00008cf0 69 73 74 65 64 20 69 6e 73 69 64 65 20 74 68 65 |isted inside the| 00008d00 20 6c 6f 67 20 66 69 6c 65 2e 20 20 54 68 69 73 | log file. This| 00008d10 20 70 72 6f 64 75 63 65 73 20 68 75 6d 6f 6e 67 | produces humong| 00008d20 6f 75 73 20 66 69 6c 65 73 2c 20 61 73 20 74 68 |ous files, as th| 00008d30 69 73 20 69 73 20 70 6c 61 69 6e 20 74 65 78 74 |is is plain text| 00008d40 20 42 61 73 69 63 20 6e 6f 74 20 74 6f 6b 65 6e | Basic not token| 00008d50 69 73 65 64 20 42 61 73 69 63 2e 0a 0a 34 2e 38 |ised Basic...4.8| 00008d60 20 53 70 65 63 69 61 6c 20 66 69 6c 65 73 0a 0a | Special files..| 00008d70 0a 0a 0a 0a 53 70 65 63 69 61 6c 20 66 69 6c 65 |....Special file| 00008d80 73 20 61 72 65 20 75 73 65 64 20 74 6f 20 68 65 |s are used to he| 00008d90 6c 70 20 42 61 73 43 6f 6d 70 72 65 73 73 20 74 |lp BasCompress t| 00008da0 6f 20 68 61 6e 64 6c 65 20 74 68 65 20 45 56 41 |o handle the EVA| 00008db0 4c 75 61 74 69 6f 6e 20 6f 66 20 76 61 72 69 61 |Luation of varia| 00008dc0 62 6c 65 73 2e 20 20 41 20 73 70 65 63 69 61 6c |bles. A special| 00008dd0 20 66 69 6c 65 20 63 6f 6e 73 69 73 74 69 6e 67 | file consisting| 00008de0 20 6f 66 20 61 20 6c 69 73 74 20 6f 66 20 72 6f | of a list of ro| 00008df0 75 74 69 6e 65 73 20 74 68 61 74 20 61 72 65 20 |utines that are | 00008e00 65 78 70 65 63 74 65 64 20 74 6f 20 63 6f 6e 74 |expected to cont| 00008e10 61 69 6e 20 74 68 69 73 20 6b 65 79 77 6f 72 64 |ain this keyword| 00008e20 2c 20 61 6e 64 2f 6f 72 20 61 20 73 65 63 6f 6e |, and/or a secon| 00008e30 64 61 72 79 20 6c 69 73 74 20 6f 66 20 61 6e 79 |dary list of any| 00008e40 20 70 61 72 74 69 63 75 6c 61 72 20 6c 61 62 65 | particular labe| 00008e50 6c 73 20 74 68 61 74 20 6d 75 73 74 20 6e 6f 74 |ls that must not| 00008e60 20 62 65 20 72 65 64 75 63 65 64 2e 0a 0a 54 68 | be reduced...Th| 00008e70 65 20 77 72 69 74 61 62 6c 65 20 6d 65 6e 75 20 |e writable menu | 00008e80 69 74 65 6d 20 61 6c 6c 6f 77 73 20 79 6f 75 20 |item allows you | 00008e90 74 6f 20 74 79 70 65 20 69 6e 20 61 20 66 75 6c |to type in a ful| 00008ea0 6c 20 70 61 74 68 6e 61 6d 65 2e 20 20 49 74 20 |l pathname. It | 00008eb0 69 73 20 65 61 73 69 65 72 20 6a 75 73 74 20 74 |is easier just t| 00008ec0 6f 20 64 72 61 67 20 74 68 65 20 66 69 6c 65 20 |o drag the file | 00008ed0 6f 6e 74 6f 20 74 68 65 20 63 6f 6e 74 72 6f 6c |onto the control| 00008ee0 20 77 69 6e 64 6f 77 2c 20 74 68 6f 75 67 68 2e | window, though.| 00008ef0 0a 0a 57 61 72 6e 20 75 6e 64 65 66 69 6e 65 64 |..Warn undefined| 00008f00 0a 0a 4e 6f 72 6d 61 6c 6c 79 20 69 74 20 77 6f |..Normally it wo| 00008f10 75 6c 64 6e 27 74 20 6d 61 74 74 65 72 20 74 68 |uldn't matter th| 00008f20 61 74 20 79 6f 75 20 68 61 76 65 20 74 6f 6c 64 |at you have told| 00008f30 20 42 61 73 43 6f 6d 70 72 65 73 73 20 61 62 6f | BasCompress abo| 00008f40 75 74 20 73 70 65 63 69 61 6c 20 72 6f 75 74 69 |ut special routi| 00008f50 6e 65 73 20 74 68 61 74 20 61 72 65 6e 27 74 20 |nes that aren't | 00008f60 75 73 65 64 20 69 6e 20 74 68 65 20 69 6e 70 75 |used in the inpu| 00008f70 74 20 66 69 6c 65 2e 20 20 48 6f 77 65 76 65 72 |t file. However| 00008f80 20 74 68 65 72 65 20 69 73 20 73 74 69 6c 6c 20 | there is still | 00008f90 74 68 69 73 20 6f 70 74 69 6f 6e 20 74 68 61 74 |this option that| 00008fa0 20 77 69 6c 6c 20 72 65 70 6f 72 74 20 73 75 70 | will report sup| 00008fb0 65 72 66 6c 75 6f 75 73 20 64 65 66 69 6e 69 74 |erfluous definit| 00008fc0 69 6f 6e 73 20 66 6f 75 6e 64 20 69 6e 20 53 70 |ions found in Sp| 00008fd0 65 63 69 61 6c 20 66 69 6c 65 73 2e 0a 0a 53 68 |ecial files...Sh| 00008fe0 6f 77 20 65 78 70 61 6e 73 69 6f 6e 0a 0a 57 69 |ow expansion..Wi| 00008ff0 74 68 20 74 68 69 73 20 69 74 65 6d 20 74 69 63 |th this item tic| 00009000 6b 65 64 2c 20 65 76 65 72 79 20 73 70 65 63 69 |ked, every speci| 00009010 61 6c 20 6c 61 62 65 6c 20 63 6f 6e 73 74 72 75 |al label constru| 00009020 63 74 65 64 20 77 69 6c 6c 20 67 65 6e 65 72 61 |cted will genera| 00009030 74 65 20 61 20 77 61 72 6e 69 6e 67 20 6d 65 73 |te a warning mes| 00009040 73 61 67 65 20 69 6e 74 6f 20 74 68 65 20 6c 6f |sage into the lo| 00009050 67 20 66 69 6c 65 2e 20 20 54 68 69 73 20 63 61 |g file. This ca| 00009060 6e 20 62 65 20 75 73 65 66 75 6c 20 66 6f 72 20 |n be useful for | 00009070 73 68 6f 77 69 6e 67 20 77 68 61 74 20 79 6f 75 |showing what you| 00009080 20 74 68 69 6e 6b 20 73 68 6f 75 6c 64 20 61 70 | think should ap| 00009090 70 65 61 72 2c 20 61 6e 64 20 77 68 61 74 20 42 |pear, and what B| 000090a0 61 73 43 6f 6d 70 72 65 73 73 20 74 68 69 6e 6b |asCompress think| 000090b0 73 20 73 68 6f 75 6c 64 20 61 70 70 65 61 72 2e |s should appear.| 000090c0 0a 0a 34 2e 39 20 43 72 6f 73 73 2d 72 65 66 65 |..4.9 Cross-refe| 000090d0 72 65 6e 63 65 0a 0a 0a 0a 0a 0a 46 72 6f 6d 20 |rence......From | 000090e0 68 65 72 65 20 79 6f 75 20 64 65 66 69 6e 65 20 |here you define | 000090f0 61 6c 6c 20 61 73 70 65 63 74 73 20 6f 66 20 74 |all aspects of t| 00009100 68 65 20 28 72 61 74 68 65 72 20 6c 61 72 67 65 |he (rather large| 00009110 29 20 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 |) cross-referenc| 00009120 69 6e 67 20 73 75 62 2d 73 79 73 74 65 6d 2e 0a |ing sub-system..| 00009130 0a 53 61 76 65 20 61 73 0a 0a 54 68 69 73 20 6c |.Save as..This l| 00009140 65 61 64 73 20 74 6f 20 61 20 73 74 61 6e 64 61 |eads to a standa| 00009150 72 64 20 73 61 76 65 20 61 73 20 64 69 61 6c 6f |rd save as dialo| 00009160 67 75 65 20 62 6f 78 2c 20 75 73 65 64 20 74 6f |gue box, used to| 00009170 20 64 65 66 69 6e 65 20 74 68 65 20 66 69 6c 65 | define the file| 00009180 20 74 6f 20 77 68 69 63 68 20 74 68 65 20 63 72 | to which the cr| 00009190 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 20 77 69 |oss-reference wi| 000091a0 6c 6c 20 62 65 20 64 75 6d 70 65 64 2e 20 20 54 |ll be dumped. T| 000091b0 68 69 73 20 77 69 6c 6c 20 62 65 20 61 20 73 74 |his will be a st| 000091c0 61 6e 64 61 72 64 20 54 65 78 74 20 66 69 6c 65 |andard Text file| 000091d0 2e 0a 0a 49 6e 63 6c 75 64 65 20 64 65 6c 65 74 |...Include delet| 000091e0 65 64 0a 0a 57 68 65 6e 20 74 69 63 6b 65 64 2c |ed..When ticked,| 000091f0 20 74 68 69 73 20 77 69 6c 6c 20 66 6f 72 63 65 | this will force| 00009200 20 61 6c 6c 20 74 68 65 20 73 75 70 65 72 66 6c | all the superfl| 00009210 75 6f 75 73 20 72 6f 75 74 69 6e 65 73 20 61 6e |uous routines an| 00009220 64 20 76 61 72 69 61 62 6c 65 73 20 74 6f 20 62 |d variables to b| 00009230 65 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 |e included in th| 00009240 65 20 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 |e cross-referenc| 00009250 65 2e 20 20 54 68 69 73 20 69 73 20 75 73 75 61 |e. This is usua| 00009260 6c 6c 79 20 6e 6f 74 20 73 75 63 68 20 61 20 67 |lly not such a g| 00009270 6f 6f 64 20 69 64 65 61 2c 20 61 73 20 74 68 65 |ood idea, as the| 00009280 20 70 72 6f 63 65 73 73 20 6f 66 20 64 65 6c 65 | process of dele| 00009290 74 69 6f 6e 20 72 65 6d 6f 76 65 73 20 61 6c 6c |tion removes all| 000092a0 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 69 | the reference i| 000092b0 6e 66 6f 72 6d 61 74 69 6f 6e 2e 20 20 46 6f 72 |nformation. For| 000092c0 20 61 20 66 75 6c 6c 20 63 72 6f 73 73 2d 72 65 | a full cross-re| 000092d0 66 65 72 65 6e 63 65 2c 20 61 6c 73 6f 20 64 69 |ference, also di| 000092e0 73 61 62 6c 65 20 74 68 65 20 72 65 6d 6f 76 61 |sable the remova| 000092f0 6c 20 6f 66 20 75 6e 75 73 65 64 20 72 6f 75 74 |l of unused rout| 00009300 69 6e 65 73 20 28 73 65 65 20 4f 75 74 70 75 74 |ines (see Output| 00009310 29 2c 20 77 68 69 63 68 20 6c 65 61 76 65 73 20 |), which leaves | 00009320 74 68 69 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e |this information| 00009330 20 69 6e 20 74 61 63 74 2e 0a 0a 52 65 66 65 72 | in tact...Refer| 00009340 65 6e 63 65 20 6f 72 64 65 72 0a 0a 54 68 69 73 |ence order..This| 00009350 20 6c 65 61 64 73 20 74 6f 20 61 6e 20 6f 72 64 | leads to an ord| 00009360 65 72 20 64 69 61 6c 6f 67 75 65 20 62 6f 78 20 |er dialogue box | 00009370 28 73 65 65 20 62 65 6c 6f 77 29 20 75 73 65 64 |(see below) used| 00009380 20 74 6f 20 73 65 74 20 74 68 65 20 73 6f 72 74 | to set the sort| 00009390 69 6e 67 20 63 72 69 74 65 72 69 61 20 66 6f 72 |ing criteria for| 000093a0 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 73 2e | the references.| 000093b0 20 20 54 68 69 73 20 69 73 20 70 72 6f 62 61 62 | This is probab| 000093c0 6c 79 20 62 65 73 74 20 6c 65 66 74 20 61 73 20 |ly best left as | 000093d0 74 68 65 20 64 65 66 61 75 6c 74 3a 20 4e 61 6d |the default: Nam| 000093e0 65 2c 20 54 79 70 65 2c 20 4c 6f 63 61 74 69 6f |e, Type, Locatio| 000093f0 6e 2e 0a 0a 56 61 72 69 61 62 6c 65 73 0a 0a 52 |n...Variables..R| 00009400 6f 75 74 69 6e 65 73 0a 0a 0a 0a 0a 0a 54 68 65 |outines......The| 00009410 73 65 20 74 77 6f 20 69 74 65 6d 73 20 6c 65 61 |se two items lea| 00009420 64 20 69 6e 74 6f 20 69 64 65 6e 74 69 63 61 6c |d into identical| 00009430 20 73 75 62 2d 6d 65 6e 75 73 2e 20 20 54 68 65 | sub-menus. The| 00009440 79 20 61 6c 6c 6f 77 20 74 68 65 20 63 72 6f 73 |y allow the cros| 00009450 73 2d 72 65 66 65 72 65 6e 63 69 6e 67 20 74 6f |s-referencing to| 00009460 20 62 65 20 64 65 66 69 6e 65 64 20 66 6f 72 20 | be defined for | 00009470 62 6f 74 68 20 69 6e 64 65 70 65 6e 64 65 6e 74 |both independent| 00009480 6c 79 2e 0a 0a 56 65 72 62 6f 73 69 74 79 0a 0a |ly...Verbosity..| 00009490 54 68 69 73 20 6c 65 61 64 73 20 74 6f 20 61 20 |This leads to a | 000094a0 73 75 62 2d 6d 65 6e 75 20 77 68 65 72 65 20 79 |sub-menu where y| 000094b0 6f 75 20 63 61 6e 20 64 65 66 69 6e 65 20 74 68 |ou can define th| 000094c0 65 20 6c 65 76 65 6c 20 6f 66 20 64 65 74 61 69 |e level of detai| 000094d0 6c 20 6f 66 20 74 68 65 20 63 72 6f 73 73 2d 72 |l of the cross-r| 000094e0 65 66 65 72 65 6e 63 69 6e 67 20 69 6e 66 6f 72 |eferencing infor| 000094f0 6d 61 74 69 6f 6e 2e 20 20 53 65 65 20 a7 33 2e |mation. See .3.| 00009500 32 2e 0a 0a 54 79 70 65 73 0a 0a 55 73 65 64 20 |2...Types..Used | 00009510 74 6f 20 64 65 66 69 6e 65 20 77 68 61 74 20 74 |to define what t| 00009520 79 70 65 73 20 6f 66 20 76 61 72 69 61 62 6c 65 |ypes of variable| 00009530 73 20 6f 72 20 72 6f 75 74 69 6e 65 73 20 61 72 |s or routines ar| 00009540 65 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 |e included in th| 00009550 65 20 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 |e cross-referenc| 00009560 65 2e 20 20 55 73 75 61 6c 6c 79 20 74 68 69 73 |e. Usually this| 00009570 20 77 6f 75 6c 64 20 62 65 20 61 6c 6c 20 74 79 | would be all ty| 00009580 70 65 73 2c 20 62 75 74 20 73 6f 6d 65 74 69 6d |pes, but sometim| 00009590 65 73 20 79 6f 75 20 6d 69 67 68 74 20 6f 6e 6c |es you might onl| 000095a0 79 20 77 61 6e 74 20 74 6f 20 6b 6e 6f 77 20 61 |y want to know a| 000095b0 62 6f 75 74 20 74 68 65 20 69 6e 74 65 67 65 72 |bout the integer| 000095c0 73 2c 20 73 61 79 2e 20 20 4a 75 73 74 20 64 65 |s, say. Just de| 000095d0 2d 74 69 63 6b 20 61 6c 6c 20 74 68 65 20 6f 74 |-tick all the ot| 000095e0 68 65 72 73 2e 0a 0a 4f 72 64 65 72 0a 0a 0a 0a |hers...Order....| 000095f0 0a 0a 54 68 69 73 20 64 69 61 6c 6f 67 75 65 20 |..This dialogue | 00009600 62 6f 78 20 69 73 20 71 75 69 74 65 20 63 6f 6d |box is quite com| 00009610 70 6c 69 63 61 74 65 64 2e 20 20 42 61 73 69 63 |plicated. Basic| 00009620 61 6c 6c 79 2c 20 79 6f 75 20 61 72 65 20 74 72 |ally, you are tr| 00009630 79 69 6e 67 20 74 6f 20 64 65 66 69 6e 65 20 73 |ying to define s| 00009640 65 76 65 72 61 6c 20 6c 61 79 65 72 73 20 6f 66 |everal layers of| 00009650 20 6f 72 64 65 72 69 6e 67 2e 20 20 46 69 72 73 | ordering. Firs| 00009660 74 20 6f 66 20 61 6c 6c 20 65 76 65 72 79 74 68 |t of all everyth| 00009670 69 6e 67 20 69 73 20 73 6f 72 74 65 64 20 61 63 |ing is sorted ac| 00009680 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 6c |cording to the l| 00009690 65 66 74 20 68 61 6e 64 20 63 6f 6c 75 6d 6e 2e |eft hand column.| 000096a0 20 20 4e 6f 77 20 42 61 73 43 6f 6d 70 72 65 73 | Now BasCompres| 000096b0 73 20 67 6f 65 73 20 74 68 72 6f 75 67 68 20 74 |s goes through t| 000096c0 68 65 73 65 20 73 6f 72 74 65 64 20 69 74 65 6d |hese sorted item| 000096d0 73 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 20 61 20 |s looking for a | 000096e0 73 65 71 75 65 6e 63 65 20 6f 66 20 69 74 65 6d |sequence of item| 000096f0 73 20 74 68 61 74 20 61 72 65 20 74 68 65 20 73 |s that are the s| 00009700 61 6d 65 2c 20 61 63 63 6f 72 64 69 6e 67 20 74 |ame, according t| 00009710 6f 20 74 68 69 73 20 6f 72 64 65 72 69 6e 67 2e |o this ordering.| 00009720 20 20 4e 6f 77 2c 20 66 6f 72 20 65 61 63 68 20 | Now, for each | 00009730 73 65 71 75 65 6e 63 65 20 66 6f 75 6e 64 20 69 |sequence found i| 00009740 74 20 77 69 6c 6c 20 73 6f 72 74 20 74 68 65 6d |t will sort them| 00009750 20 61 67 61 69 6e 20 75 73 69 6e 67 20 77 68 61 | again using wha| 00009760 74 65 76 65 72 20 79 6f 75 20 68 61 76 65 20 64 |tever you have d| 00009770 65 66 69 6e 65 64 20 69 6e 20 63 6f 6c 75 6d 6e |efined in column| 00009780 20 74 77 6f 2e 20 20 54 68 69 73 20 72 65 63 75 | two. This recu| 00009790 72 73 65 73 20 6f 6e 20 65 61 63 68 20 73 6d 61 |rses on each sma| 000097a0 6c 6c 65 72 20 61 6e 64 20 73 6d 61 6c 6c 65 72 |ller and smaller| 000097b0 20 73 75 62 2d 73 65 71 75 65 6e 63 65 20 74 6f | sub-sequence to| 000097c0 20 74 68 65 20 63 6f 6c 75 6d 6e 73 20 6f 6e 20 | the columns on | 000097d0 74 68 65 20 72 69 67 68 74 2e 0a 0a 4f 62 76 69 |the right...Obvi| 000097e0 6f 75 73 6c 79 2c 20 69 74 20 69 73 6e 27 74 20 |ously, it isn't | 000097f0 6d 75 63 68 20 75 73 65 20 68 61 76 69 6e 67 20 |much use having | 00009800 74 77 6f 20 63 6f 6c 75 6d 6e 73 20 73 6f 72 74 |two columns sort| 00009810 69 6e 67 20 62 79 20 74 68 65 20 73 61 6d 65 20 |ing by the same | 00009820 63 72 69 74 65 72 69 61 2c 20 73 6f 20 42 61 73 |criteria, so Bas| 00009830 43 6f 6d 70 72 65 73 73 20 77 69 6c 6c 20 6e 6f |Compress will no| 00009840 74 20 61 6c 6c 6f 77 20 79 6f 75 20 74 6f 20 73 |t allow you to s| 00009850 65 6c 65 63 74 20 69 74 2e 0a 0a 59 6f 75 20 63 |elect it...You c| 00009860 61 6e 20 64 65 6c 65 74 65 20 61 20 63 6f 6c 75 |an delete a colu| 00009870 6d 6e 20 62 79 20 41 44 4a 55 53 54 20 63 6c 69 |mn by ADJUST cli| 00009880 63 6b 69 6e 67 20 6f 6e 20 74 68 65 20 6f 72 64 |cking on the ord| 00009890 65 72 69 6e 67 20 61 6c 72 65 61 64 79 20 75 73 |ering already us| 000098a0 65 64 2e 20 20 54 68 69 73 20 77 69 6c 6c 20 63 |ed. This will c| 000098b0 61 75 73 65 20 61 6c 6c 20 63 6f 6c 75 6d 6e 73 |ause all columns| 000098c0 20 74 6f 20 74 68 65 20 72 69 67 68 74 20 74 6f | to the right to| 000098d0 20 73 68 75 66 66 6c 65 20 6f 6e 65 20 63 6f 6c | shuffle one col| 000098e0 75 6d 6e 20 74 6f 20 74 68 65 20 6c 65 66 74 20 |umn to the left | 000098f0 28 74 68 69 73 20 69 73 20 71 75 69 74 65 20 61 |(this is quite a| 00009900 20 70 6c 65 61 73 69 6e 67 20 67 72 61 70 68 69 | pleasing graphi| 00009910 63 61 6c 20 65 66 66 65 63 74 20 3a 2d 29 0a 0a |cal effect :-)..| 00009920 49 74 20 69 73 6e 27 74 20 70 6f 73 73 69 62 6c |It isn't possibl| 00009930 65 20 74 6f 20 68 61 76 65 20 61 20 94 62 6c 61 |e to have a .bla| 00009940 6e 6b 95 20 63 6f 6c 75 6d 6e 2e 20 20 49 66 20 |nk. column. If | 00009950 79 6f 75 20 61 74 74 65 6d 70 74 20 74 6f 20 63 |you attempt to c| 00009960 72 65 61 74 65 20 61 20 62 6c 61 6e 6b 20 63 6f |reate a blank co| 00009970 6c 75 6d 6e 20 74 68 65 6e 20 79 6f 75 72 20 6e |lumn then your n| 00009980 65 77 20 63 6f 6c 75 6d 6e 20 77 69 6c 6c 20 62 |ew column will b| 00009990 65 20 73 68 69 66 74 65 64 20 74 6f 20 74 68 65 |e shifted to the| 000099a0 20 6c 65 66 74 20 28 79 65 74 20 61 6e 6f 74 68 | left (yet anoth| 000099b0 65 72 20 70 6c 65 61 73 69 6e 67 20 67 72 61 70 |er pleasing grap| 000099c0 68 69 63 61 6c 20 65 66 66 65 63 74 20 3a 2d 29 |hical effect :-)| 000099d0 0a 0a 49 74 20 69 73 20 70 6f 73 73 69 62 6c 65 |..It is possible| 000099e0 20 74 6f 20 64 65 6c 65 74 65 20 61 6c 6c 20 63 | to delete all c| 000099f0 6f 6c 75 6d 6e 73 2e 20 20 54 68 69 73 20 77 69 |olumns. This wi| 00009a00 6c 6c 20 63 61 75 73 65 20 74 68 65 20 6f 75 74 |ll cause the out| 00009a10 70 75 74 20 74 6f 20 61 70 70 65 61 72 20 69 6e |put to appear in| 00009a20 20 61 20 73 65 65 6d 69 6e 67 6c 79 20 72 61 6e | a seemingly ran| 00009a30 64 6f 6d 20 6f 72 64 65 72 2e 20 20 4e 6f 74 20 |dom order. Not | 00009a40 6d 75 63 68 20 75 73 65 2c 20 61 70 61 72 74 20 |much use, apart | 00009a50 66 72 6f 6d 20 73 65 65 69 6e 67 20 68 6f 77 20 |from seeing how | 00009a60 67 6f 6f 64 20 74 68 65 20 68 61 73 68 69 6e 67 |good the hashing| 00009a70 20 66 75 6e 63 74 69 6f 6e 20 69 73 21 0a 0a 4f | function is!..O| 00009a80 72 64 65 72 69 6e 67 20 62 79 20 6c 6f 63 61 74 |rdering by locat| 00009a90 69 6f 6e 20 69 73 20 6f 6e 6c 79 20 6d 65 61 6e |ion is only mean| 00009aa0 69 6e 67 66 75 6c 20 66 6f 72 20 72 65 66 65 72 |ingful for refer| 00009ab0 65 6e 63 65 73 2e 20 20 55 73 69 6e 67 20 74 68 |ences. Using th| 00009ac0 69 73 20 6f 70 74 69 6f 6e 20 66 6f 72 20 76 61 |is option for va| 00009ad0 72 69 61 62 6c 65 73 20 6f 72 20 72 6f 75 74 69 |riables or routi| 00009ae0 6e 65 73 20 77 69 6c 6c 20 72 65 73 75 6c 74 20 |nes will result | 00009af0 69 6e 20 61 20 28 73 65 65 6d 69 6e 67 6c 79 29 |in a (seemingly)| 00009b00 20 72 61 6e 64 6f 6d 20 6f 72 64 65 72 2e 0a 0a | random order...| 00009b10 54 68 65 20 44 69 63 74 2e 20 73 74 61 6e 64 61 |The Dict. standa| 00009b20 72 64 73 20 66 6f 72 20 64 69 63 74 69 6f 6e 61 |rds for dictiona| 00009b30 72 79 2c 20 61 6e 64 20 69 73 20 73 69 6d 69 6c |ry, and is simil| 00009b40 61 72 20 74 6f 20 4e 61 6d 65 2c 20 65 78 63 65 |ar to Name, exce| 00009b50 70 74 20 69 6e 73 74 65 61 64 20 6f 66 20 6f 72 |pt instead of or| 00009b60 64 65 72 69 6e 67 20 62 79 20 41 53 43 49 49 2c |dering by ASCII,| 00009b70 20 6f 72 64 65 72 20 61 73 20 69 74 20 77 6f 75 | order as it wou| 00009b80 6c 64 20 61 70 70 65 61 72 20 69 6e 20 61 2e 2e |ld appear in a..| 00009b90 2e 20 28 67 75 65 73 73 29 2e 0a 0a 34 2e 31 30 |. (guess)...4.10| 00009ba0 20 43 68 6f 69 63 65 73 20 44 69 61 6c 6f 67 75 | Choices Dialogu| 00009bb0 65 20 42 6f 78 0a 0a 0a 0a 0a 0a 54 68 69 73 20 |e Box......This | 00009bc0 64 69 61 6c 6f 67 75 65 20 62 6f 67 20 63 6f 6e |dialogue bog con| 00009bd0 74 72 6f 6c 73 20 61 73 70 65 63 74 73 20 6f 66 |trols aspects of| 00009be0 20 74 68 65 20 66 72 6f 6e 74 20 65 6e 64 20 61 | the front end a| 00009bf0 70 70 6c 69 63 61 74 69 6f 6e 20 69 74 73 65 6c |pplication itsel| 00009c00 66 2c 20 6e 6f 74 20 74 68 65 20 62 61 63 6b 20 |f, not the back | 00009c10 65 6e 64 2e 20 20 49 74 20 67 72 61 62 73 20 74 |end. It grabs t| 00009c20 68 65 20 69 6e 70 75 74 20 66 6f 63 75 73 20 73 |he input focus s| 00009c30 6f 20 74 68 61 74 20 73 6f 6d 65 20 6b 65 79 62 |o that some keyb| 00009c40 6f 61 72 64 20 73 68 6f 72 74 20 63 75 74 73 20 |oard short cuts | 00009c50 63 61 6e 20 62 65 20 75 73 65 64 2c 20 6d 75 73 |can be used, mus| 00009c60 74 20 6e 6f 74 61 62 6c 79 20 52 45 54 55 52 4e |t notably RETURN| 00009c70 20 61 6e 64 20 45 53 43 41 50 45 2e 20 20 41 6c | and ESCAPE. Al| 00009c80 73 6f 20 74 68 65 20 62 6f 74 74 6f 6d 20 72 6f |so the bottom ro| 00009c90 77 20 6f 66 20 62 75 74 74 6f 6e 73 20 63 61 6e |w of buttons can| 00009ca0 20 62 65 20 70 72 65 73 73 65 64 20 75 73 69 6e | be pressed usin| 00009cb0 67 20 46 32 2c 20 46 33 2c 20 65 74 63 2e 2e 0a |g F2, F3, etc...| 00009cc0 0a 53 65 74 0a 0a 54 68 69 73 20 61 63 63 65 70 |.Set..This accep| 00009cd0 74 73 20 74 68 65 20 61 62 6f 76 65 20 76 61 6c |ts the above val| 00009ce0 75 65 73 20 66 6f 72 20 74 68 65 20 63 75 72 72 |ues for the curr| 00009cf0 65 6e 74 20 73 65 73 73 69 6f 6e 20 6f 66 20 42 |ent session of B| 00009d00 61 73 43 6f 6d 70 72 65 73 73 2e 20 20 46 6f 72 |asCompress. For| 00009d10 20 74 68 65 20 65 66 66 65 63 74 73 20 74 6f 20 | the effects to | 00009d20 62 65 20 70 65 72 6d 61 6e 65 6e 74 20 75 73 65 |be permanent use| 00009d30 20 65 69 74 68 65 72 20 53 61 76 65 20 6f 72 20 | either Save or | 00009d40 53 61 76 65 20 66 75 6c 6c 2e 20 20 41 6c 73 6f |Save full. Also| 00009d50 20 73 65 65 20 74 68 65 20 6e 6f 74 65 20 62 65 | see the note be| 00009d60 6c 6f 77 20 61 62 6f 75 74 20 75 73 69 6e 67 20 |low about using | 00009d70 6f 75 74 6c 69 6e 65 20 66 6f 6e 74 73 20 69 6e |outline fonts in| 00009d80 20 64 69 61 6c 6f 67 75 65 20 62 6f 78 65 73 2e | dialogue boxes.| 00009d90 0a 0a 43 61 6e 63 65 6c 0a 0a 54 68 69 73 20 64 |..Cancel..This d| 00009da0 69 73 72 65 67 61 72 64 73 20 61 6e 79 20 65 64 |isregards any ed| 00009db0 69 74 73 20 79 6f 75 20 68 61 76 65 20 6d 61 64 |its you have mad| 00009dc0 65 20 74 6f 20 74 68 65 20 61 62 6f 76 65 20 6f |e to the above o| 00009dd0 70 74 69 6f 6e 73 2e 0a 0a 53 61 76 65 20 66 75 |ptions...Save fu| 00009de0 6c 6c 0a 0a 41 6c 6f 6e 67 20 77 69 74 68 20 61 |ll..Along with a| 00009df0 6c 6c 20 74 68 65 20 65 78 70 65 63 74 65 64 20 |ll the expected | 00009e00 73 77 69 74 63 68 65 73 20 61 6e 64 20 73 6f 72 |switches and sor| 00009e10 74 20 6f 72 64 65 72 69 6e 67 2c 20 61 6c 73 6f |t ordering, also| 00009e20 20 73 61 76 65 64 20 77 69 74 68 20 74 68 65 20 | saved with the | 00009e30 63 68 6f 69 63 65 73 20 61 72 65 20 74 68 65 20 |choices are the | 00009e40 64 65 66 61 75 6c 74 20 6e 61 6d 65 73 20 6f 66 |default names of| 00009e50 20 74 68 65 20 6c 6f 67 2c 20 63 72 6f 73 73 2d | the log, cross-| 00009e60 72 65 66 65 72 65 6e 63 65 20 61 6e 64 20 6f 75 |reference and ou| 00009e70 74 70 75 74 20 66 69 6c 65 73 2e 20 20 54 68 69 |tput files. Thi| 00009e80 73 20 6f 70 74 69 6f 6e 20 73 61 76 65 73 20 74 |s option saves t| 00009e90 68 65 20 66 75 6c 6c 20 70 61 74 68 6e 61 6d 65 |he full pathname| 00009ea0 20 6f 66 20 65 61 63 68 20 6f 66 20 74 68 65 73 | of each of thes| 00009eb0 65 20 66 69 6c 65 73 2c 20 61 6e 64 20 77 6f 75 |e files, and wou| 00009ec0 6c 64 20 62 65 20 75 73 65 64 20 77 68 69 6c 65 |ld be used while| 00009ed0 20 64 65 76 65 6c 6f 70 69 6e 67 20 61 20 70 72 | developing a pr| 00009ee0 6f 6a 65 63 74 2c 20 74 6f 20 73 61 76 65 20 64 |oject, to save d| 00009ef0 72 61 67 67 69 6e 67 20 74 68 65 20 6c 6f 67 20 |ragging the log | 00009f00 61 6e 64 20 6f 75 74 70 75 74 20 66 69 6c 65 73 |and output files| 00009f10 20 65 61 63 68 20 73 65 73 73 69 6f 6e 2e 0a 0a | each session...| 00009f20 0a 0a 53 61 76 65 0a 0a 41 73 20 53 61 76 65 20 |..Save..As Save | 00009f30 66 75 6c 6c 20 62 75 74 20 6f 6e 6c 79 20 74 68 |full but only th| 00009f40 65 20 6c 65 61 66 20 6e 61 6d 65 73 20 6f 66 20 |e leaf names of | 00009f50 74 68 65 20 6c 6f 67 2c 20 63 72 6f 73 73 2d 72 |the log, cross-r| 00009f60 65 66 65 72 65 6e 63 65 20 61 6e 64 20 6f 75 74 |eference and out| 00009f70 70 75 74 20 66 69 6c 65 73 20 61 72 65 20 73 61 |put files are sa| 00009f80 76 65 64 2e 20 20 54 68 69 73 20 69 73 20 68 61 |ved. This is ha| 00009f90 6e 64 79 20 66 6f 72 20 6d 6f 72 65 20 67 65 6e |ndy for more gen| 00009fa0 65 72 69 63 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 |eric environment| 00009fb0 73 2e 20 20 46 6f 72 20 69 6e 73 74 61 6e 63 65 |s. For instance| 00009fc0 2c 20 69 66 20 79 6f 75 20 61 6c 77 61 79 73 20 |, if you always | 00009fd0 63 61 6c 6c 20 79 6f 75 72 20 57 69 6d 70 20 70 |call your Wimp p| 00009fe0 72 6f 67 72 61 6d 73 20 57 69 6d 70 2c 20 74 68 |rograms Wimp, th| 00009ff0 65 6e 20 74 6f 20 6d 61 6b 65 20 61 20 73 74 61 |en to make a sta| 0000a000 6e 64 61 72 64 20 61 70 70 6c 69 63 61 74 69 6f |ndard applicatio| 0000a010 6e 20 66 72 6f 6d 20 74 68 69 73 2c 20 74 68 65 |n from this, the| 0000a020 20 6f 75 74 70 75 74 20 66 69 6c 65 20 77 6f 75 | output file wou| 0000a030 6c 64 20 62 65 20 21 52 75 6e 49 6d 61 67 65 2c |ld be !RunImage,| 0000a040 20 61 6e 64 20 74 68 69 73 20 77 6f 75 6c 64 20 | and this would | 0000a050 62 65 20 61 20 62 65 74 74 65 72 20 64 65 66 61 |be a better defa| 0000a060 75 6c 74 20 74 6f 20 68 61 76 65 20 74 68 61 6e |ult to have than| 0000a070 20 4f 75 74 70 75 74 2e 0a 0a 44 65 66 61 75 6c | Output...Defaul| 0000a080 74 0a 0a 54 68 69 73 20 73 65 74 73 20 75 70 20 |t..This sets up | 0000a090 65 76 65 72 79 74 68 69 6e 67 20 74 6f 20 61 20 |everything to a | 0000a0a0 64 65 66 61 75 6c 74 20 73 74 61 74 65 2c 20 66 |default state, f| 0000a0b0 6f 72 20 77 68 65 6e 20 79 6f 75 27 76 65 20 6d |or when you've m| 0000a0c0 61 64 65 20 61 20 63 6f 6d 70 6c 65 74 65 20 6d |ade a complete m| 0000a0d0 65 73 73 20 6f 66 20 74 68 65 20 6f 70 74 69 6f |ess of the optio| 0000a0e0 6e 73 2e 20 20 54 68 69 73 20 64 65 66 61 75 6c |ns. This defaul| 0000a0f0 74 20 73 74 61 74 65 20 63 61 6e 20 61 6c 73 6f |t state can also| 0000a100 20 62 65 20 61 63 68 69 65 76 65 64 20 62 79 20 | be achieved by | 0000a110 64 65 6c 65 74 69 6e 67 20 74 68 65 20 43 68 6f |deleting the Cho| 0000a120 69 63 65 73 20 66 69 6c 65 20 69 6e 73 69 64 65 |ices file inside| 0000a130 20 21 42 43 2e 21 66 65 2c 20 61 6e 64 20 72 65 | !BC.!fe, and re| 0000a140 73 74 61 72 74 69 6e 67 20 74 68 65 20 61 70 70 |starting the app| 0000a150 6c 69 63 61 74 69 6f 6e 2e 0a 0a 52 75 6e 20 42 |lication...Run B| 0000a160 61 73 43 6f 6d 70 72 65 73 73 65 64 20 66 69 6c |asCompressed fil| 0000a170 65 0a 0a 57 69 74 68 20 74 68 69 73 20 6f 70 74 |e..With this opt| 0000a180 69 6f 6e 20 74 69 63 6b 65 64 20 77 68 65 6e 65 |ion ticked whene| 0000a190 76 65 72 20 61 6e 20 6f 75 74 70 75 74 20 66 69 |ver an output fi| 0000a1a0 6c 65 20 69 73 20 73 70 65 63 69 66 69 65 64 20 |le is specified | 0000a1b0 69 74 20 69 73 20 69 6d 6d 65 64 69 61 74 65 6c |it is immediatel| 0000a1c0 79 20 65 78 65 63 75 74 65 64 20 61 66 74 65 72 |y executed after| 0000a1d0 20 62 65 69 6e 67 20 67 65 6e 65 72 61 74 65 64 | being generated| 0000a1e0 2e 20 20 54 68 69 73 20 69 73 20 75 73 65 66 75 |. This is usefu| 0000a1f0 6c 20 77 68 69 6c 65 20 63 6f 6e 73 74 72 75 63 |l while construc| 0000a200 74 69 6e 67 20 61 20 53 70 65 63 69 61 6c 20 66 |ting a Special f| 0000a210 69 6c 65 2c 20 73 6f 20 74 68 65 20 70 72 6f 67 |ile, so the prog| 0000a220 72 61 6d 20 63 61 6e 20 70 72 6f 63 65 65 64 20 |ram can proceed | 0000a230 61 6e 64 20 72 65 70 6f 72 74 20 74 68 65 20 6d |and report the m| 0000a240 69 73 73 69 6e 67 20 76 61 72 69 61 62 6c 65 73 |issing variables| 0000a250 20 66 6f 75 6e 64 20 3a 2d 29 0a 0a 4c 6f 61 64 | found :-)..Load| 0000a260 20 6c 6f 67 20 66 69 6c 65 0a 0a 49 66 20 61 20 | log file..If a | 0000a270 6c 6f 67 20 66 69 6c 65 20 77 61 73 20 73 70 65 |log file was spe| 0000a280 63 69 66 69 65 64 20 74 68 65 6e 20 74 68 69 73 |cified then this| 0000a290 20 69 73 20 94 6f 70 65 6e 65 64 95 20 69 6d 6d | is .opened. imm| 0000a2a0 65 64 69 61 74 65 6c 79 20 61 66 74 65 72 20 69 |ediately after i| 0000a2b0 74 20 69 73 20 67 65 6e 65 72 61 74 65 64 2e 20 |t is generated. | 0000a2c0 20 4f 6e 20 61 20 70 72 6f 70 65 72 6c 79 20 73 | On a properly s| 0000a2d0 65 74 20 75 70 20 73 79 73 74 65 6d 20 74 68 69 |et up system thi| 0000a2e0 73 20 77 6f 75 6c 64 20 63 61 75 73 65 20 45 64 |s would cause Ed| 0000a2f0 69 74 20 74 6f 20 62 65 20 6c 6f 61 64 65 64 20 |it to be loaded | 0000a300 75 70 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 |up automatically| 0000a310 20 69 66 20 6e 65 63 65 73 73 61 72 79 2c 20 61 | if necessary, a| 0000a320 6e 64 20 72 65 70 6c 61 63 65 20 61 6e 79 20 76 |nd replace any v| 0000a330 65 72 73 69 6f 6e 20 63 75 72 72 65 6e 74 6c 79 |ersion currently| 0000a340 20 68 65 6c 64 20 69 66 20 45 64 69 74 20 69 73 | held if Edit is| 0000a350 20 61 6c 72 65 61 64 79 20 72 65 73 69 64 65 6e | already residen| 0000a360 74 2e 20 20 4d 75 6c 74 69 2d 74 61 73 6b 69 6e |t. Multi-taskin| 0000a370 67 20 61 74 20 69 74 73 20 62 65 73 74 2e 20 20 |g at its best. | 0000a380 4e 6f 74 65 20 74 68 61 74 20 69 66 20 79 6f 75 |Note that if you| 0000a390 20 65 64 69 74 20 74 68 65 20 94 6f 6c 64 95 20 | edit the .old. | 0000a3a0 6c 6f 67 20 66 69 6c 65 2c 20 74 68 65 6e 20 74 |log file, then t| 0000a3b0 68 69 73 20 73 6d 6f 6f 74 68 6e 65 73 73 20 69 |his smoothness i| 0000a3c0 73 20 72 75 69 6e 65 64 2c 20 62 65 63 61 75 73 |s ruined, becaus| 0000a3d0 65 20 45 64 69 74 20 77 69 6c 6c 20 6f 70 65 6e |e Edit will open| 0000a3e0 20 75 70 20 61 20 6e 65 77 20 77 69 6e 64 6f 77 | up a new window| 0000a3f0 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 | containing the | 0000a400 6e 65 77 20 76 65 72 73 69 6f 6e 2e 20 20 43 27 |new version. C'| 0000a410 65 73 74 20 6c 61 20 76 69 65 2e 0a 0a 4c 6f 61 |est la vie...Loa| 0000a420 64 20 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 |d cross-referenc| 0000a430 65 20 66 69 6c 65 0a 0a 53 61 6d 65 20 61 73 20 |e file..Same as | 0000a440 74 68 65 20 61 62 6f 76 65 20 6f 70 74 69 6f 6e |the above option| 0000a450 2c 20 62 75 74 20 6c 6f 61 64 73 20 74 68 65 20 |, but loads the | 0000a460 63 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 20 |cross-reference | 0000a470 66 69 6c 65 20 67 65 6e 65 72 61 74 65 64 2c 20 |file generated, | 0000a480 69 66 20 61 6e 79 2e 0a 0a 4e 61 6d 65 20 6f 75 |if any...Name ou| 0000a490 74 70 75 74 20 61 73 20 3c 4d 61 69 6e 3e 0a 0a |tput as <Main>..| 0000a4a0 54 68 69 73 20 69 73 20 61 20 6b 6c 75 64 67 65 |This is a kludge| 0000a4b0 20 74 6f 20 72 65 64 75 63 65 20 74 68 65 20 73 | to reduce the s| 0000a4c0 69 7a 65 20 6f 66 20 62 6f 74 68 20 63 72 6f 73 |ize of both cros| 0000a4d0 73 2d 72 65 66 65 72 65 6e 63 65 20 61 6e 64 20 |s-reference and | 0000a4e0 6c 6f 67 20 66 69 6c 65 73 2e 20 20 41 73 20 61 |log files. As a| 0000a4f0 6e 79 20 57 69 6d 70 20 61 70 70 6c 69 63 61 74 |ny Wimp applicat| 0000a500 69 6f 6e 20 6d 75 73 74 20 75 73 65 20 74 68 65 |ion must use the| 0000a510 20 66 75 6c 6c 20 70 61 74 68 6e 61 6d 65 20 6f | full pathname o| 0000a520 66 20 65 76 65 72 79 20 66 69 6c 65 2c 20 74 68 |f every file, th| 0000a530 69 73 20 69 73 20 77 68 61 74 20 69 73 20 70 61 |is is what is pa| 0000a540 73 73 65 64 20 74 6f 20 74 68 65 20 62 61 63 6b |ssed to the back| 0000a550 20 65 6e 64 20 61 70 70 6c 69 63 61 74 69 6f 6e | end application| 0000a560 2e 20 20 48 6f 77 65 76 65 72 20 74 68 69 73 20 |. However this | 0000a570 63 61 75 73 65 73 20 74 68 65 20 66 75 6c 6c 20 |causes the full | 0000a580 70 61 74 68 6e 61 6d 65 20 74 6f 20 62 65 20 70 |pathname to be p| 0000a590 72 69 6e 74 65 64 20 69 6e 20 65 76 65 72 79 20 |rinted in every | 0000a5a0 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 61 6e |error message an| 0000a5b0 64 20 72 65 66 65 72 65 6e 63 65 2e 20 20 41 73 |d reference. As| 0000a5c0 20 61 20 73 74 6f 70 20 67 61 70 2c 20 74 68 69 | a stop gap, thi| 0000a5d0 73 20 66 72 6f 6e 74 20 65 6e 64 20 63 61 6e 20 |s front end can | 0000a5e0 62 65 20 74 6f 6c 64 20 74 6f 20 73 65 74 20 74 |be told to set t| 0000a5f0 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 |he environment v| 0000a600 61 72 69 61 62 6c 65 20 3c 4d 61 69 6e 3e 20 74 |ariable <Main> t| 0000a610 6f 20 74 68 65 20 66 75 6c 6c 20 70 61 74 68 6e |o the full pathn| 0000a620 61 6d 65 2c 20 61 6e 64 20 70 61 73 73 20 74 68 |ame, and pass th| 0000a630 69 73 20 74 6f 20 74 68 65 20 62 61 63 6b 20 65 |is to the back e| 0000a640 6e 64 20 61 70 70 6c 69 63 61 74 69 6f 6e 2e 20 |nd application. | 0000a650 20 49 74 20 64 6f 65 73 20 6d 65 61 6e 20 79 6f | It does mean yo| 0000a660 75 20 64 6f 6e 27 74 20 73 65 65 20 74 68 65 20 |u don't see the | 0000a670 61 63 74 75 61 6c 20 6e 61 6d 65 20 6f 66 20 74 |actual name of t| 0000a680 68 65 20 66 69 6c 65 20 62 65 69 6e 67 20 70 72 |he file being pr| 0000a690 6f 63 65 73 73 65 64 2c 20 62 75 74 20 74 68 61 |ocessed, but tha| 0000a6a0 74 20 75 73 75 61 6c 6c 79 20 69 73 6e 27 74 20 |t usually isn't | 0000a6b0 61 20 70 72 6f 62 6c 65 6d 20 61 73 20 79 6f 75 |a problem as you| 0000a6c0 20 6b 6e 6f 77 20 74 68 61 74 20 61 6e 79 77 61 | know that anywa| 0000a6d0 79 2e 0a 0a 4f 75 74 70 75 74 20 66 69 6c 65 20 |y...Output file | 0000a6e0 6c 65 61 66 20 6e 61 6d 65 20 73 61 6d 65 20 61 |leaf name same a| 0000a6f0 73 20 69 6e 70 75 74 0a 0a 54 68 69 73 20 6f 70 |s input..This op| 0000a700 74 69 6f 6e 20 69 73 20 75 73 65 66 75 6c 20 77 |tion is useful w| 0000a710 68 65 6e 20 63 6f 6d 70 72 65 73 73 69 6e 67 20 |hen compressing | 0000a720 6c 6f 74 73 20 6f 66 20 66 69 6c 65 73 20 66 72 |lots of files fr| 0000a730 6f 6d 20 6f 6e 65 20 64 69 72 65 63 74 6f 72 79 |om one directory| 0000a740 20 74 6f 20 61 6e 6f 74 68 65 72 2c 20 66 6f 72 | to another, for| 0000a750 20 65 78 61 6d 70 6c 65 20 68 61 76 69 6e 67 20 | example having | 0000a760 63 6f 6d 70 72 65 73 73 65 64 20 76 65 72 73 69 |compressed versi| 0000a770 6f 6e 73 20 6f 66 20 61 6c 6c 20 79 6f 75 72 20 |ons of all your | 0000a780 6c 69 62 72 61 72 79 20 66 69 6c 65 73 2e 20 20 |library files. | 0000a790 48 61 76 69 6e 67 20 64 65 66 69 6e 65 64 20 74 |Having defined t| 0000a7a0 68 65 20 6f 75 74 70 75 74 20 64 69 72 65 63 74 |he output direct| 0000a7b0 6f 72 79 2c 20 74 68 65 20 66 75 6c 6c 20 70 61 |ory, the full pa| 0000a7c0 74 68 6e 61 6d 65 20 69 73 20 63 6f 6e 73 74 72 |thname is constr| 0000a7d0 75 63 74 65 64 20 66 72 6f 6d 20 74 68 69 73 20 |ucted from this | 0000a7e0 64 69 72 65 63 74 6f 72 79 20 61 6e 64 20 74 68 |directory and th| 0000a7f0 65 20 6c 65 61 66 20 6e 61 6d 65 20 6f 66 20 74 |e leaf name of t| 0000a800 68 65 20 69 6e 70 75 74 20 66 69 6c 65 2c 20 73 |he input file, s| 0000a810 61 76 69 6e 67 20 71 75 69 74 65 20 61 20 62 69 |aving quite a bi| 0000a820 74 20 6f 66 20 74 79 70 69 6e 67 2e 0a 0a 55 73 |t of typing...Us| 0000a830 65 20 6f 75 74 6c 69 6e 65 20 66 6f 6e 74 73 20 |e outline fonts | 0000a840 69 6e 20 64 69 61 6c 6f 67 75 65 20 62 6f 78 65 |in dialogue boxe| 0000a850 73 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 20 63 |s..BasCompress c| 0000a860 6f 6d 65 73 20 77 69 74 68 20 74 77 6f 20 76 65 |omes with two ve| 0000a870 72 73 69 6f 6e 73 20 6f 66 20 61 6c 6c 20 69 74 |rsions of all it| 0000a880 73 91 20 77 69 6e 64 6f 77 73 20 99 20 77 69 74 |s. windows . wit| 0000a890 68 20 61 6e 64 20 77 69 74 68 6f 75 74 20 6f 75 |h and without ou| 0000a8a0 74 6c 69 6e 65 20 66 6f 6e 74 73 2e 20 20 55 73 |tline fonts. Us| 0000a8b0 65 72 73 20 6f 66 20 6c 6f 77 2d 72 65 73 6f 6c |ers of low-resol| 0000a8c0 75 74 69 6f 6e 20 6d 6f 6e 69 74 6f 72 73 20 6d |ution monitors m| 0000a8d0 61 79 20 70 72 65 66 65 72 20 74 6f 20 75 73 65 |ay prefer to use| 0000a8e0 20 74 68 65 20 73 79 73 74 65 6d 20 66 6f 6e 74 | the system font| 0000a8f0 20 76 65 72 73 69 6f 6e 73 2e 20 20 41 6c 73 6f | versions. Also| 0000a900 2c 20 52 69 73 63 50 43 20 75 73 65 72 73 20 6d |, RiscPC users m| 0000a910 61 79 20 68 61 76 65 20 74 6f 20 75 73 65 20 74 |ay have to use t| 0000a920 68 65 20 94 53 79 73 74 65 6d 20 66 6f 6e 74 95 |he .System font.| 0000a930 20 77 69 6e 64 6f 77 73 20 66 6f 72 20 74 77 6f | windows for two| 0000a940 20 72 65 61 73 6f 6e 73 3a 20 66 69 72 73 74 20 | reasons: first | 0000a950 62 65 63 61 75 73 65 20 74 68 65 20 66 6f 6e 74 |because the font| 0000a960 69 66 69 65 64 20 77 69 6e 64 6f 77 73 20 75 73 |ified windows us| 0000a970 65 20 66 6f 6e 74 73 20 61 74 20 61 20 64 69 66 |e fonts at a dif| 0000a980 66 65 72 65 6e 74 20 73 69 7a 65 20 28 73 6c 69 |ferent size (sli| 0000a990 67 68 74 6c 79 20 6c 61 72 67 65 72 20 66 6f 72 |ghtly larger for| 0000a9a0 20 6c 6f 77 20 72 65 73 6f 6c 75 74 69 6f 6e 20 | low resolution | 0000a9b0 75 73 65 72 73 29 20 77 68 69 63 68 20 6c 6f 6f |users) which loo| 0000a9c0 6b 73 20 75 67 6c 79 20 62 75 74 20 6d 6f 72 65 |ks ugly but more| 0000a9d0 20 69 6d 70 6f 72 74 61 6e 74 6c 79 20 62 65 63 | importantly bec| 0000a9e0 61 75 73 65 20 6f 66 20 61 20 62 75 67 20 69 6e |ause of a bug in| 0000a9f0 20 74 68 65 20 57 69 6e 64 6f 77 20 4d 61 6e 61 | the Window Mana| 0000aa00 67 65 72 20 74 68 61 74 20 63 61 75 73 65 73 20 |ger that causes | 0000aa10 63 6c 69 63 6b 73 20 6f 6e 20 28 67 65 6e 75 69 |clicks on (genui| 0000aa20 6e 65 29 20 66 6f 6e 74 20 69 63 6f 6e 73 20 74 |ne) font icons t| 0000aa30 6f 20 63 61 75 73 65 20 74 68 65 20 57 69 6d 70 |o cause the Wimp| 0000aa40 20 74 6f 20 94 66 6f 72 67 65 74 95 20 74 68 65 | to .forget. the| 0000aa50 20 74 65 78 74 20 66 6f 6e 74 20 3a 28 0a 0a 4e | text font :(..N| 0000aa60 6f 74 65 20 74 68 61 74 20 66 6f 72 20 68 69 73 |ote that for his| 0000aa70 74 6f 72 69 63 61 6c 20 72 65 61 73 6f 6e 73 20 |torical reasons | 0000aa80 63 68 61 6e 67 65 73 20 74 6f 20 74 68 69 73 20 |changes to this | 0000aa90 6f 70 74 69 6f 6e 20 61 72 65 20 6e 6f 74 20 75 |option are not u| 0000aaa0 70 64 61 74 65 64 20 69 6d 6d 65 64 69 61 74 65 |pdated immediate| 0000aab0 6c 79 20 62 75 74 20 6f 6e 6c 79 20 74 61 6b 65 |ly but only take| 0000aac0 20 65 66 66 65 63 74 20 74 68 65 20 6e 65 78 74 | effect the next| 0000aad0 20 74 69 6d 65 20 42 61 73 43 6f 6d 70 72 65 73 | time BasCompres| 0000aae0 73 20 69 73 20 72 75 6e 2e 0a 0a 0c 0a 0a 35 20 |s is run......5 | 0000aaf0 54 68 65 20 62 61 63 6b 20 65 6e 64 0a 0a 54 68 |The back end..Th| 0000ab00 69 73 20 63 68 61 70 74 65 72 20 64 65 73 63 72 |is chapter descr| 0000ab10 69 62 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 |ibes the underly| 0000ab20 69 6e 67 20 43 4c 49 20 70 72 6f 67 72 61 6d 2c |ing CLI program,| 0000ab30 20 61 6e 64 20 68 6f 77 20 74 6f 20 75 73 65 20 | and how to use | 0000ab40 69 74 20 65 66 66 65 63 74 69 76 65 6c 79 2e 0a |it effectively..| 0000ab50 0a 42 79 20 64 65 66 61 75 6c 74 20 61 6c 6c 20 |.By default all | 0000ab60 74 65 78 74 20 6f 75 74 70 75 74 20 69 73 20 74 |text output is t| 0000ab70 6f 20 74 68 65 20 73 63 72 65 65 6e 2e 20 20 54 |o the screen. T| 0000ab80 68 69 73 20 63 61 6e 20 62 65 20 72 65 64 69 72 |his can be redir| 0000ab90 65 63 74 65 64 20 74 6f 20 73 65 70 61 72 61 74 |ected to separat| 0000aba0 65 20 6c 6f 67 20 61 6e 64 20 63 72 6f 73 73 2d |e log and cross-| 0000abb0 72 65 66 65 72 65 6e 63 65 20 66 69 6c 65 73 2c |reference files,| 0000abc0 20 61 73 20 72 65 71 75 69 72 65 64 2e 0a 0a 35 | as required...5| 0000abd0 2e 31 20 49 6e 76 6f 6b 69 6e 67 0a 0a 44 6f 75 |.1 Invoking..Dou| 0000abe0 62 6c 65 2d 63 6c 69 63 6b 69 6e 67 20 6f 6e 20 |ble-clicking on | 0000abf0 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 |the application | 0000ac00 64 69 72 65 63 74 6f 72 79 20 66 72 6f 6d 20 61 |directory from a| 0000ac10 20 46 69 6c 65 72 20 77 69 6e 64 6f 77 20 77 69 | Filer window wi| 0000ac20 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 |ll automatically| 0000ac30 20 73 74 61 72 74 20 75 70 20 74 68 65 20 57 69 | start up the Wi| 0000ac40 6d 70 20 66 72 6f 6e 74 20 65 6e 64 20 61 70 70 |mp front end app| 0000ac50 6c 69 63 61 74 69 6f 6e 2e 20 20 54 68 69 73 20 |lication. This | 0000ac60 69 73 20 62 65 63 61 75 73 65 20 6e 6f 20 70 61 |is because no pa| 0000ac70 72 61 6d 65 74 65 72 73 20 77 65 72 65 20 70 61 |rameters were pa| 0000ac80 73 73 65 64 20 74 6f 20 74 68 65 20 21 52 75 6e |ssed to the !Run| 0000ac90 20 66 69 6c 65 2e 0a 0a 49 66 20 61 6e 79 20 70 | file...If any p| 0000aca0 61 72 61 6d 65 74 65 72 73 20 61 72 65 20 70 61 |arameters are pa| 0000acb0 73 73 65 64 20 74 6f 20 74 68 65 20 61 70 70 6c |ssed to the appl| 0000acc0 69 63 61 74 69 6f 6e 2c 20 69 2e 65 2e 20 79 6f |ication, i.e. yo| 0000acd0 75 20 61 63 74 69 76 61 74 65 64 20 69 74 20 66 |u activated it f| 0000ace0 72 6f 6d 20 61 20 63 6f 6d 6d 61 6e 64 20 73 68 |rom a command sh| 0000acf0 65 6c 6c 20 74 68 65 6e 20 74 68 65 20 62 61 63 |ell then the bac| 0000ad00 6b 20 65 6e 64 20 61 70 70 6c 69 63 61 74 69 6f |k end applicatio| 0000ad10 6e 20 69 73 20 63 61 6c 6c 65 64 20 64 69 72 65 |n is called dire| 0000ad20 63 74 2e 0a 0a 54 68 69 73 20 61 70 70 6c 69 63 |ct...This applic| 0000ad30 61 74 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 |ation requires t| 0000ad40 68 65 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e |he floating poin| 0000ad50 74 20 65 6d 75 6c 61 74 6f 72 20 6d 6f 64 75 6c |t emulator modul| 0000ad60 65 20 74 6f 20 62 65 20 72 65 73 69 64 65 6e 74 |e to be resident| 0000ad70 2e 20 20 54 68 69 73 20 69 73 20 61 75 74 6f 6d |. This is autom| 0000ad80 61 74 69 63 61 6c 6c 79 20 6c 6f 61 64 65 64 20 |atically loaded | 0000ad90 66 72 6f 6d 20 74 68 65 20 63 75 72 72 65 6e 74 |from the current| 0000ada0 20 73 79 73 74 65 6d 20 72 65 73 6f 75 72 63 65 | system resource| 0000adb0 73 2e 20 20 28 46 6c 6f 61 74 69 6e 67 20 70 6f |s. (Floating po| 0000adc0 69 6e 74 20 61 72 69 74 68 6d 65 74 69 63 20 69 |int arithmetic i| 0000add0 73 20 6f 6e 6c 79 20 75 73 65 64 20 74 6f 20 61 |s only used to a| 0000ade0 6e 61 6c 79 73 65 20 61 6e 64 20 6f 75 74 70 75 |nalyse and outpu| 0000adf0 74 20 64 65 63 69 6d 61 6c 20 6e 75 6d 62 65 72 |t decimal number| 0000ae00 73 2c 20 74 68 69 73 20 63 61 6e 20 62 65 20 64 |s, this can be d| 0000ae10 69 73 61 62 6c 65 64 20 61 6e 64 20 73 6f 20 74 |isabled and so t| 0000ae20 68 65 72 65 20 77 69 6c 6c 20 62 65 20 6e 6f 20 |here will be no | 0000ae30 6e 65 65 64 20 74 6f 20 6c 6f 61 64 20 74 68 65 |need to load the| 0000ae40 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e 74 20 | floating point | 0000ae50 65 6d 75 6c 61 74 6f 72 20 2d 20 74 68 69 73 20 |emulator - this | 0000ae60 69 73 20 6e 6f 74 20 61 20 72 65 63 6f 6d 6d 65 |is not a recomme| 0000ae70 6e 64 65 64 20 70 72 6f 63 65 64 75 72 65 2c 20 |nded procedure, | 0000ae80 74 68 6f 75 67 68 29 2e 0a 0a 41 6c 73 6f 20 72 |though)...Also r| 0000ae90 65 71 75 69 72 65 64 20 74 6f 20 62 65 20 72 65 |equired to be re| 0000aea0 73 69 64 65 6e 74 20 69 73 20 74 68 65 20 61 75 |sident is the au| 0000aeb0 74 68 6f 72 73 27 20 6f 77 6e 20 6c 69 62 72 61 |thors' own libra| 0000aec0 72 79 20 6d 6f 64 75 6c 65 3a 20 43 41 73 73 65 |ry module: CAsse| 0000aed0 6d 62 6c 65 72 2e 0a 0a 54 68 65 73 65 20 6d 6f |mbler...These mo| 0000aee0 64 75 6c 65 73 20 61 72 65 20 61 75 74 6f 6d 61 |dules are automa| 0000aef0 74 69 63 61 6c 6c 79 20 6c 6f 61 64 65 64 20 69 |tically loaded i| 0000af00 66 20 6e 6f 74 20 72 65 73 69 64 65 6e 74 2e 0a |f not resident..| 0000af10 0a 35 2e 32 20 49 6e 73 74 61 6c 6c 69 6e 67 0a |.5.2 Installing.| 0000af20 0a 54 68 65 72 65 20 61 72 65 20 74 77 6f 20 6d |.There are two m| 0000af30 65 74 68 6f 64 73 20 6f 66 20 69 6e 73 74 61 6c |ethods of instal| 0000af40 6c 69 6e 67 20 42 61 73 43 6f 6d 70 72 65 73 73 |ling BasCompress| 0000af50 20 66 6f 72 20 65 61 73 79 20 75 73 65 20 66 72 | for easy use fr| 0000af60 6f 6d 20 61 20 73 68 65 6c 6c 2e 20 20 4f 6e 65 |om a shell. One| 0000af70 20 69 73 20 74 6f 20 6a 75 73 74 20 69 6e 73 74 | is to just inst| 0000af80 61 6c 6c 20 74 68 65 20 61 70 70 6c 69 63 61 74 |all the applicat| 0000af90 69 6f 6e 20 6f 6e 74 6f 20 79 6f 75 72 20 52 75 |ion onto your Ru| 0000afa0 6e 24 50 61 74 68 2c 20 61 6e 64 20 75 73 65 20 |n$Path, and use | 0000afb0 69 74 20 62 79 20 2a 21 42 43 20 66 69 6c 65 2e |it by *!BC file.| 0000afc0 0a 0a 54 68 69 73 20 68 61 73 20 74 68 65 20 64 |..This has the d| 0000afd0 69 73 61 64 76 61 6e 74 61 67 65 20 69 6e 20 74 |isadvantage in t| 0000afe0 68 61 74 20 79 6f 75 20 6d 75 73 74 20 72 65 6d |hat you must rem| 0000aff0 65 6d 62 65 72 20 74 68 65 20 21 2e 20 20 54 68 |ember the !. Th| 0000b000 65 20 6d 75 63 68 20 62 65 74 74 65 72 20 61 6c |e much better al| 0000b010 74 65 72 6e 61 74 69 76 65 20 69 73 20 74 6f 20 |ternative is to | 0000b020 75 73 65 20 74 68 65 20 41 6c 69 61 73 24 42 61 |use the Alias$Ba| 0000b030 73 43 6f 6d 70 72 65 73 73 20 74 68 61 74 20 69 |sCompress that i| 0000b040 73 20 73 65 74 20 75 70 20 66 6f 72 20 79 6f 75 |s set up for you| 0000b050 20 69 6e 20 74 68 65 20 21 42 6f 6f 74 20 66 69 | in the !Boot fi| 0000b060 6c 65 2e 20 20 54 68 75 73 20 69 74 20 69 73 20 |le. Thus it is | 0000b070 6f 6e 6c 79 20 72 65 71 75 69 72 65 64 20 74 6f |only required to| 0000b080 20 72 75 6e 20 74 68 69 73 20 21 42 6f 6f 74 20 | run this !Boot | 0000b090 66 69 6c 65 20 69 6e 20 79 6f 75 72 20 62 6f 6f |file in your boo| 0000b0a0 74 2d 75 70 20 73 65 71 75 65 6e 63 65 2c 20 61 |t-up sequence, a| 0000b0b0 6e 64 20 74 68 65 6e 20 63 61 6c 6c 20 42 61 73 |nd then call Bas| 0000b0c0 43 6f 6d 70 72 65 73 73 20 62 79 20 2a 42 61 73 |Compress by *Bas| 0000b0d0 43 6f 6d 70 72 65 73 73 20 66 69 6c 65 2e 0a 0a |Compress file...| 0000b0e0 49 6e 20 62 6f 74 68 20 74 68 65 20 61 62 6f 76 |In both the abov| 0000b0f0 65 20 69 74 20 69 73 20 65 73 73 65 6e 74 69 61 |e it is essentia| 0000b100 6c 20 74 68 61 74 20 74 68 65 20 21 52 75 6e 20 |l that the !Run | 0000b110 66 69 6c 65 20 67 65 74 73 20 65 78 65 63 75 74 |file gets execut| 0000b120 65 64 2c 20 61 73 20 74 68 69 73 20 65 6e 73 75 |ed, as this ensu| 0000b130 72 65 73 20 61 75 78 69 6c 69 61 72 79 20 6d 6f |res auxiliary mo| 0000b140 64 75 6c 65 73 20 61 72 65 20 72 65 73 69 64 65 |dules are reside| 0000b150 6e 74 20 61 6e 64 20 63 68 65 63 6b 73 20 74 68 |nt and checks th| 0000b160 61 74 20 74 68 65 72 65 20 77 69 6c 6c 20 62 65 |at there will be| 0000b170 20 65 6e 6f 75 67 68 20 6d 65 6d 6f 72 79 20 74 | enough memory t| 0000b180 6f 20 73 74 61 72 74 20 74 68 65 20 61 70 70 6c |o start the appl| 0000b190 69 63 61 74 69 6f 6e 2e 0a 0a 35 2e 33 20 45 6e |ication...5.3 En| 0000b1a0 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 |vironment variab| 0000b1b0 6c 65 73 0a 0a 42 65 63 61 75 73 65 20 74 68 65 |les..Because the| 0000b1c0 20 43 4c 49 20 6c 69 6d 69 74 73 20 63 6f 6d 6d | CLI limits comm| 0000b1d0 61 6e 64 20 6c 69 6e 65 73 20 74 6f 20 28 61 20 |and lines to (a | 0000b1e0 70 61 6c 74 72 79 29 20 32 35 36 20 62 79 74 65 |paltry) 256 byte| 0000b1f0 73 2c 20 73 65 76 65 72 61 6c 20 74 72 69 63 6b |s, several trick| 0000b200 73 20 77 65 72 65 20 75 73 65 64 20 69 6e 20 6f |s were used in o| 0000b210 72 64 65 72 20 74 6f 20 6d 61 6b 65 20 74 68 65 |rder to make the| 0000b220 20 66 72 6f 6e 74 20 65 6e 64 20 61 70 70 6c 69 | front end appli| 0000b230 63 61 74 69 6f 6e 20 77 6f 72 6b 20 65 66 66 65 |cation work effe| 0000b240 63 74 69 76 65 6c 79 20 77 69 74 68 20 74 68 65 |ctively with the| 0000b250 20 62 61 63 6b 20 65 6e 64 20 70 72 6f 67 72 61 | back end progra| 0000b260 6d 20 28 77 69 74 68 20 66 75 6c 6c 20 70 61 74 |m (with full pat| 0000b270 68 6e 61 6d 65 73 29 2e 20 20 54 68 65 73 65 20 |hnames). These | 0000b280 63 61 6e 20 62 65 20 70 75 74 20 74 6f 20 67 72 |can be put to gr| 0000b290 65 61 74 20 61 64 76 61 6e 74 61 67 65 20 66 6f |eat advantage fo| 0000b2a0 72 20 43 4c 49 20 75 73 65 72 73 2e 20 20 49 6e |r CLI users. In| 0000b2b0 20 61 6c 6c 20 63 61 73 65 73 20 61 6e 20 75 6e | all cases an un| 0000b2c0 73 65 74 2c 20 6f 72 20 65 6d 70 74 79 20 76 61 |set, or empty va| 0000b2d0 72 69 61 62 6c 65 20 69 73 20 69 67 6e 6f 72 65 |riable is ignore| 0000b2e0 64 2e 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 24 |d...BasCompress$| 0000b2f0 4f 70 74 69 6f 6e 73 0a 0a 09 09 54 68 69 73 20 |Options....This | 0000b300 73 68 6f 75 6c 64 20 62 65 20 61 20 73 74 72 69 |should be a stri| 0000b310 6e 67 20 6f 66 20 74 68 65 20 73 61 6d 65 20 66 |ng of the same f| 0000b320 6f 72 6d 61 74 20 61 73 20 61 20 6e 6f 72 6d 61 |ormat as a norma| 0000b330 6c 20 70 61 72 61 6d 65 74 65 72 20 73 65 74 2c |l parameter set,| 0000b340 20 65 78 63 65 70 74 20 6d 69 73 73 69 6e 67 20 | except missing | 0000b350 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 |the name of the | 0000b360 69 6e 70 75 74 20 66 69 6c 65 20 28 6f 66 20 63 |input file (of c| 0000b370 6f 75 72 73 65 29 2e 20 20 57 69 74 68 20 74 68 |ourse). With th| 0000b380 69 73 20 79 6f 75 20 63 61 6e 20 6f 76 65 72 72 |is you can overr| 0000b390 69 64 65 20 61 6e 79 20 6f 66 20 74 68 65 20 62 |ide any of the b| 0000b3a0 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c 74 20 |uilt-in default | 0000b3b0 76 61 6c 75 65 73 20 77 69 74 68 20 79 6f 75 72 |values with your| 0000b3c0 20 6f 77 6e 20 70 72 65 66 65 72 72 65 64 20 73 | own preferred s| 0000b3d0 65 74 2e 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 |et...BasCompress| 0000b3e0 24 4f 75 74 70 75 74 0a 0a 09 09 54 68 65 20 6e |$Output....The n| 0000b3f0 61 6d 65 20 6f 66 20 74 68 65 20 74 6f 6b 65 6e |ame of the token| 0000b400 69 73 65 64 20 62 61 73 69 63 20 66 69 6c 65 20 |ised basic file | 0000b410 70 72 6f 64 75 63 65 64 2e 0a 0a 42 61 73 43 6f |produced...BasCo| 0000b420 6d 70 72 65 73 73 24 4c 6f 67 0a 0a 09 09 54 68 |mpress$Log....Th| 0000b430 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 6c 6f |e name of the lo| 0000b440 67 20 66 69 6c 65 20 70 72 6f 64 75 63 65 64 2e |g file produced.| 0000b450 0a 0a 42 61 73 43 6f 6d 70 72 65 73 73 24 58 52 |..BasCompress$XR| 0000b460 65 66 0a 0a 09 09 54 68 65 20 6e 61 6d 65 20 6f |ef....The name o| 0000b470 66 20 74 68 65 20 63 72 6f 73 73 2d 72 65 66 65 |f the cross-refe| 0000b480 72 65 6e 63 65 20 66 69 6c 65 20 70 72 6f 64 75 |rence file produ| 0000b490 63 65 64 2e 0a 0a 42 61 73 43 6f 6d 70 72 65 73 |ced...BasCompres| 0000b4a0 73 24 53 70 65 63 69 61 6c 0a 0a 09 09 54 68 65 |s$Special....The| 0000b4b0 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 70 65 | name of the spe| 0000b4c0 63 69 61 6c 20 66 69 6c 65 28 73 29 20 69 6e 70 |cial file(s) inp| 0000b4d0 75 74 20 28 61 20 63 6f 6d 6d 61 20 73 65 70 61 |ut (a comma sepa| 0000b4e0 72 61 74 65 64 20 6c 69 73 74 29 2e 0a 0a 42 61 |rated list)...Ba| 0000b4f0 73 43 6f 6d 70 72 65 73 73 24 50 61 74 68 0a 0a |sCompress$Path..| 0000b500 09 09 41 20 63 6f 6d 6d 61 20 73 65 70 61 72 61 |..A comma separa| 0000b510 74 65 64 20 6c 69 73 74 20 6f 66 20 64 69 72 65 |ted list of dire| 0000b520 63 74 6f 72 69 65 73 20 75 73 65 64 20 74 6f 20 |ctories used to | 0000b530 66 69 6e 64 20 53 70 65 63 69 61 6c 20 66 69 6c |find Special fil| 0000b540 65 73 0a 0a 49 74 20 73 68 6f 75 6c 64 20 62 65 |es..It should be| 0000b550 20 6e 6f 74 65 64 20 74 68 61 74 20 74 68 65 20 | noted that the | 0000b560 66 72 6f 6e 74 20 65 6e 64 20 61 70 70 6c 69 63 |front end applic| 0000b570 61 74 69 6f 6e 20 72 65 73 65 74 73 20 61 6c 6c |ation resets all| 0000b580 20 6f 66 20 74 68 65 73 65 20 76 61 72 69 61 62 | of these variab| 0000b590 6c 65 73 20 28 65 78 63 65 70 74 20 74 68 65 20 |les (except the | 0000b5a0 50 61 74 68 29 2c 20 73 6f 20 6b 65 65 70 20 74 |Path), so keep t| 0000b5b0 68 69 73 20 69 6e 20 6d 69 6e 64 2e 0a 0a 35 2e |his in mind...5.| 0000b5c0 34 20 54 68 65 20 43 4c 49 20 70 61 72 61 6d 65 |4 The CLI parame| 0000b5d0 74 65 72 73 0a 0a 54 68 65 20 6f 72 64 65 72 69 |ters..The orderi| 0000b5e0 6e 67 20 6f 66 20 74 68 65 20 70 61 72 61 6d 65 |ng of the parame| 0000b5f0 74 65 72 73 20 68 61 73 20 62 65 65 6e 20 63 61 |ters has been ca| 0000b600 72 65 66 75 6c 6c 79 20 73 65 74 20 75 70 20 73 |refully set up s| 0000b610 6f 20 74 68 65 72 65 20 69 73 20 75 73 75 61 6c |o there is usual| 0000b620 6c 79 20 6e 6f 20 6e 65 65 64 20 74 6f 20 6e 61 |ly no need to na| 0000b630 6d 65 20 61 6e 79 20 70 61 72 61 6d 65 74 65 72 |me any parameter| 0000b640 73 2e 0a 0a 09 42 61 73 43 6f 6d 70 72 65 73 73 |s....BasCompress| 0000b650 20 5b 2d 49 6e 5d 20 3c 66 69 6c 65 3e 0a 0a 09 | [-In] <file>...| 0000b660 09 20 5b 5b 2d 4f 75 74 20 3c 66 69 6c 65 3e 5d |. [[-Out <file>]| 0000b670 0a 0a 09 09 20 5b 5b 2d 53 70 65 63 69 61 6c 5d |.... [[-Special]| 0000b680 20 3c 66 69 6c 65 73 3e 5d 0a 0a 09 09 20 5b 5b | <files>].... [[| 0000b690 2d 4c 6f 67 5d 20 3c 66 69 6c 65 3e 5d 0a 0a 09 |-Log] <file>]...| 0000b6a0 09 20 5b 5b 2d 58 52 65 66 46 69 6c 65 5d 20 3c |. [[-XRefFile] <| 0000b6b0 66 69 6c 65 3e 5d 0a 0a 09 09 20 5b 5b 2d 58 52 |file>].... [[-XR| 0000b6c0 65 66 5d 20 3c 6e 3e 5d 0a 0a 09 09 20 2e 2e 2e |ef] <n>].... ...| 0000b6d0 0a 0a 53 6f 20 66 6f 72 20 6e 6f 72 6d 61 6c 20 |..So for normal | 0000b6e0 77 6f 72 6b 20 79 6f 75 20 77 6f 75 6c 64 20 68 |work you would h| 0000b6f0 61 76 65 20 73 65 74 20 75 70 20 42 61 73 43 6f |ave set up BasCo| 0000b700 6d 70 72 65 73 73 24 4f 70 74 69 6f 6e 73 20 61 |mpress$Options a| 0000b710 6e 64 20 79 6f 75 27 64 20 6a 75 73 74 20 64 6f |nd you'd just do| 0000b720 20 42 61 73 43 6f 6d 70 72 65 73 73 20 40 2e 4d | BasCompress @.M| 0000b730 79 50 72 6f 67 20 40 2e 52 65 73 75 6c 74 20 40 |yProg @.Result @| 0000b740 2e 53 70 65 63 69 61 6c 20 40 2e 4c 6f 67 20 22 |.Special @.Log "| 0000b750 22 20 30 2e 0a 0a 54 68 65 72 65 20 69 73 20 61 |" 0...There is a| 0000b760 20 2d 48 65 6c 70 20 6f 70 74 69 6f 6e 20 74 6f | -Help option to| 0000b770 20 64 69 73 70 6c 61 79 20 61 20 62 72 69 65 66 | display a brief| 0000b780 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 | description of | 0000b790 74 68 65 20 61 76 61 69 6c 61 62 6c 65 20 6f 70 |the available op| 0000b7a0 74 69 6f 6e 73 2e 0a 0a 41 73 20 77 69 74 68 20 |tions...As with | 0000b7b0 61 6c 6c 20 61 6c 6c 20 6e 61 74 69 76 65 20 41 |all all native A| 0000b7c0 72 63 68 69 6d 65 64 65 73 20 61 70 70 6c 69 63 |rchimedes applic| 0000b7d0 61 74 69 6f 6e 73 2c 20 73 77 69 74 63 68 65 73 |ations, switches| 0000b7e0 20 74 6f 67 67 6c 65 20 74 68 65 20 70 72 65 76 | toggle the prev| 0000b7f0 69 6f 75 73 20 73 74 61 74 65 20 28 4f 53 5f 52 |ious state (OS_R| 0000b800 65 61 64 41 72 67 73 20 64 6f 65 73 20 6e 6f 74 |eadArgs does not| 0000b810 20 61 6c 6c 6f 77 20 2d 66 20 61 6e 64 20 2b 66 | allow -f and +f| 0000b820 29 2e 0a 0a 35 2e 34 2e 31 20 49 6e 70 75 74 0a |)...5.4.1 Input.| 0000b830 0a 0a 0a 2d 49 6e 20 3c 66 69 6c 65 3e 09 74 68 |...-In <file>.th| 0000b840 69 73 20 6d 75 73 74 20 61 6c 77 61 79 73 20 62 |is must always b| 0000b850 65 20 67 69 76 65 6e 0a 0a 2d 4c 69 62 72 61 72 |e given..-Librar| 0000b860 79 09 69 67 6e 6f 72 65 20 75 6e 64 65 66 69 6e |y.ignore undefin| 0000b870 65 64 20 72 6f 75 74 69 6e 65 73 20 26 20 6d 61 |ed routines & ma| 0000b880 69 6e 20 70 72 6f 67 72 61 6d 20 28 4f 46 46 29 |in program (OFF)| 0000b890 20 a7 32 2e 38 2e 31 0a 0a 2d 4d 75 6c 74 69 44 | .2.8.1..-MultiD| 0000b8a0 45 46 09 61 6c 6c 6f 77 20 6d 75 6c 74 69 70 6c |EF.allow multipl| 0000b8b0 65 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 6f 66 |e definitions of| 0000b8c0 20 74 68 65 20 73 61 6d 65 20 72 6f 75 74 69 6e | the same routin| 0000b8d0 65 20 28 4f 46 46 29 20 a7 32 2e 31 30 2e 31 0a |e (OFF) .2.10.1.| 0000b8e0 0a 2d 4e 75 6d 62 65 72 09 61 6e 61 6c 79 73 65 |.-Number.analyse| 0000b8f0 20 64 65 63 69 6d 61 6c 20 6e 75 6d 62 65 72 73 | decimal numbers| 0000b900 20 28 6e 65 65 64 73 20 46 50 45 6d 75 6c 61 74 | (needs FPEmulat| 0000b910 6f 72 29 20 28 4f 4e 29 20 a7 20 32 2e 34 0a 0a |or) (ON) . 2.4..| 0000b920 2d 53 57 49 09 09 63 6f 6e 76 65 72 74 20 53 57 |-SWI..convert SW| 0000b930 49 20 73 74 72 69 6e 67 73 20 74 6f 20 6e 75 6d |I strings to num| 0000b940 62 65 72 73 20 28 4f 4e 29 20 a7 32 2e 35 0a 0a |bers (ON) .2.5..| 0000b950 2d 53 57 49 42 61 64 09 66 61 75 6c 74 20 6d 61 |-SWIBad.fault ma| 0000b960 6c 66 6f 72 6d 65 64 20 53 57 49 20 6e 61 6d 65 |lformed SWI name| 0000b970 73 20 28 4f 46 46 29 20 a7 32 2e 35 0a 0a 2d 53 |s (OFF) .2.5..-S| 0000b980 57 49 45 78 69 73 74 09 72 65 70 6f 72 74 20 75 |WIExist.report u| 0000b990 6e 6b 6e 6f 77 6e 20 53 57 49 20 73 74 72 69 6e |nknown SWI strin| 0000b9a0 67 73 20 28 4f 4e 29 20 a7 32 2e 35 0a 0a 2d 57 |gs (ON) .2.5..-W| 0000b9b0 45 6e 64 52 74 6e 09 72 65 70 6f 72 74 20 63 6f |EndRtn.report co| 0000b9c0 6e 64 69 74 69 6f 6e 61 6c 20 65 78 69 74 73 20 |nditional exits | 0000b9d0 28 4f 4e 29 20 a7 32 2e 38 2e 33 0a 0a 35 2e 34 |(ON) .2.8.3..5.4| 0000b9e0 2e 32 20 4f 75 74 70 75 74 0a 0a 0a 0a 2d 4c 69 |.2 Output....-Li| 0000b9f0 73 74 4f 75 74 20 3c 6e 3e 09 65 63 68 6f 20 6f |stOut <n>.echo o| 0000ba00 75 74 70 75 74 20 69 6e 20 73 63 72 65 65 6e 20 |utput in screen | 0000ba10 6d 6f 64 65 20 3c 6e 3e 20 28 4f 46 46 29 0a 0a |mode <n> (OFF)..| 0000ba20 2d 4f 75 74 20 3c 66 69 6c 65 3e 09 6f 75 74 70 |-Out <file>.outp| 0000ba30 75 74 20 66 69 6c 65 20 28 73 65 65 20 42 61 73 |ut file (see Bas| 0000ba40 43 6f 6d 70 72 65 73 73 24 4f 75 74 70 75 74 29 |Compress$Output)| 0000ba50 0a 0a 2d 52 65 64 75 63 65 56 61 72 20 3c 74 79 |..-ReduceVar <ty| 0000ba60 70 65 3e 0a 0a 2d 52 65 64 75 63 65 52 74 6e 20 |pe>..-ReduceRtn | 0000ba70 3c 74 79 70 65 3e 0a 0a 2d 52 65 64 75 63 65 20 |<type>..-Reduce | 0000ba80 3c 74 79 70 65 3e 09 72 65 64 75 63 65 20 74 68 |<type>.reduce th| 0000ba90 65 73 65 20 74 79 70 65 73 20 6f 66 20 6c 61 62 |ese types of lab| 0000baa0 65 6c 73 20 28 69 72 73 49 52 53 70 66 29 20 a7 |els (irsIRSpf) .| 0000bab0 32 2e 31 31 0a 0a 2d 53 69 6e 67 6c 65 09 6e 6f |2.11..-Single.no| 0000bac0 20 63 6f 6e 63 61 74 65 6e 61 74 69 6f 6e 20 6f | concatenation o| 0000bad0 66 20 6f 75 74 70 75 74 20 6c 69 6e 65 73 20 28 |f output lines (| 0000bae0 4f 46 46 29 20 a7 32 2e 31 33 0a 0a 2d 55 6e 75 |OFF) .2.13..-Unu| 0000baf0 73 65 64 09 64 65 6c 65 74 65 20 75 6e 75 73 65 |sed.delete unuse| 0000bb00 64 20 72 6f 75 74 69 6e 65 73 20 61 6e 64 20 76 |d routines and v| 0000bb10 61 72 69 61 62 6c 65 73 20 28 4f 4e 29 20 a7 32 |ariables (ON) .2| 0000bb20 2e 38 0a 0a 0a 0a 3c 74 79 70 65 3e 20 69 73 20 |.8....<type> is | 0000bb30 61 20 73 74 72 69 6e 67 20 6f 66 20 74 68 65 73 |a string of thes| 0000bb40 65 20 6c 65 74 74 65 72 73 3a 0a 0a 09 70 09 70 |e letters:...p.p| 0000bb50 72 6f 63 65 64 75 72 65 0a 0a 09 66 09 66 75 6e |rocedure...f.fun| 0000bb60 63 74 69 6f 6e 0a 0a 09 72 09 72 65 61 6c 20 76 |ction...r.real v| 0000bb70 61 72 69 61 62 6c 65 0a 0a 09 69 09 69 6e 74 65 |ariable...i.inte| 0000bb80 67 65 72 20 76 61 72 69 61 62 6c 65 0a 0a 09 73 |ger variable...s| 0000bb90 09 73 74 72 69 6e 67 20 76 61 72 69 61 62 6c 65 |.string variable| 0000bba0 0a 0a 09 52 09 72 65 61 6c 20 61 72 72 61 79 20 |...R.real array | 0000bbb0 76 61 72 69 61 62 6c 65 0a 0a 09 49 09 69 6e 74 |variable...I.int| 0000bbc0 65 67 65 72 20 61 72 72 61 79 20 76 61 72 69 61 |eger array varia| 0000bbd0 62 6c 65 0a 0a 09 53 09 73 74 72 69 6e 67 20 61 |ble...S.string a| 0000bbe0 72 72 61 79 20 76 61 72 69 61 62 6c 65 0a 0a 35 |rray variable..5| 0000bbf0 2e 34 2e 32 2e 31 20 4f 75 74 70 75 74 20 6c 69 |.4.2.1 Output li| 0000bc00 73 74 69 6e 67 0a 0a 46 69 72 73 74 20 74 68 65 |sting..First the| 0000bc10 20 6d 6f 64 65 20 69 73 20 73 65 6c 65 63 74 65 | mode is selecte| 0000bc20 64 20 28 2d 31 20 77 6f 75 6c 64 20 73 65 6c 65 |d (-1 would sele| 0000bc30 63 74 20 74 68 65 20 63 75 72 72 65 6e 74 20 6d |ct the current m| 0000bc40 6f 64 65 29 2c 20 61 6e 64 20 61 6e 20 61 70 70 |ode), and an app| 0000bc50 72 6f 70 72 69 61 74 65 20 77 61 72 6e 69 6e 67 |ropriate warning| 0000bc60 20 6f 72 20 65 72 72 6f 72 20 67 65 6e 65 72 61 | or error genera| 0000bc70 74 65 64 20 69 66 20 74 68 61 74 20 6d 6f 64 65 |ted if that mode| 0000bc80 20 69 73 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c | is not availabl| 0000bc90 65 2e 20 20 4e 65 78 74 20 61 20 62 6c 75 65 2d |e. Next a blue-| 0000bca0 6f 6e 2d 77 68 69 74 65 20 63 6f 6c 6f 75 72 20 |on-white colour | 0000bcb0 73 63 68 65 6d 65 20 69 73 20 73 65 6c 65 63 74 |scheme is select| 0000bcc0 65 64 2e 20 20 54 68 65 6e 20 74 68 65 20 64 69 |ed. Then the di| 0000bcd0 73 70 6c 61 79 20 69 73 20 73 70 6c 69 74 20 69 |splay is split i| 0000bce0 6e 74 6f 20 74 77 6f 20 63 6f 6c 75 6d 6e 73 2c |nto two columns,| 0000bcf0 20 77 69 74 68 20 74 68 65 20 6c 65 66 74 20 63 | with the left c| 0000bd00 6f 6c 75 6d 6e 20 61 62 6f 75 74 20 36 31 25 20 |olumn about 61% | 0000bd10 6f 66 20 74 68 65 20 73 63 72 65 65 6e 20 77 69 |of the screen wi| 0000bd20 64 65 20 28 38 30 20 63 6f 6c 75 6d 6e 73 20 69 |de (80 columns i| 0000bd30 6e 20 6d 6f 64 65 20 31 36 29 2e 20 20 54 68 65 |n mode 16). The| 0000bd40 20 73 6f 75 72 63 65 20 6c 69 73 74 69 6e 67 20 | source listing | 0000bd50 69 73 20 73 63 72 6f 6c 6c 65 64 20 68 65 72 65 |is scrolled here| 0000bd60 2e 20 20 4f 6e 20 74 68 65 20 72 69 67 68 74 20 |. On the right | 0000bd70 63 6f 6c 75 6d 6e 20 74 68 65 20 6f 75 74 70 75 |column the outpu| 0000bd80 74 20 69 73 20 73 63 72 6f 6c 6c 65 64 2e 0a 0a |t is scrolled...| 0000bd90 54 68 65 20 73 6f 75 72 63 65 20 6c 69 73 74 69 |The source listi| 0000bda0 6e 67 20 64 6f 65 73 20 6e 6f 74 20 69 6e 63 6c |ng does not incl| 0000bdb0 75 64 65 20 61 6e 79 20 64 65 6c 65 74 65 64 20 |ude any deleted | 0000bdc0 72 6f 75 74 69 6e 65 73 2c 20 62 75 74 20 64 6f |routines, but do| 0000bdd0 65 73 20 69 6e 63 6c 75 64 65 20 61 6c 6c 20 69 |es include all i| 0000bde0 6e 74 65 72 2d 72 6f 75 74 69 6e 65 20 6a 75 6e |nter-routine jun| 0000bdf0 6b 2e 20 20 54 68 65 20 6f 75 74 70 75 74 20 6c |k. The output l| 0000be00 69 73 74 69 6e 67 20 69 73 20 61 73 20 70 65 72 |isting is as per| 0000be10 20 74 68 65 20 6f 75 74 70 75 74 20 66 69 6c 65 | the output file| 0000be20 2c 20 69 6e 20 69 74 73 27 20 65 6e 74 69 72 65 |, in its' entire| 0000be30 74 79 2e 20 20 54 68 65 20 72 69 67 68 74 20 63 |ty. The right c| 0000be40 6f 6c 75 6d 6e 20 69 73 20 6f 6e 6c 79 20 75 70 |olumn is only up| 0000be50 64 61 74 65 64 20 65 61 63 68 20 74 69 6d 65 20 |dated each time | 0000be60 61 20 77 68 6f 6c 65 20 6c 69 6e 65 20 68 61 73 |a whole line has| 0000be70 20 62 65 65 6e 20 61 6d 61 73 73 65 64 2c 20 77 | been amassed, w| 0000be80 68 69 63 68 20 63 6f 75 6c 64 20 74 61 6b 65 20 |hich could take | 0000be90 61 20 77 68 69 6c 65 20 69 66 20 6d 61 78 69 6d |a while if maxim| 0000bea0 75 6d 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 69 |um compression i| 0000beb0 73 20 73 65 6c 65 63 74 65 64 2e 0a 0a 54 68 65 |s selected...The| 0000bec0 72 65 20 69 73 6e 27 74 20 72 65 61 6c 6c 79 20 |re isn't really | 0000bed0 6d 75 63 68 20 75 73 65 20 66 6f 72 20 74 68 69 |much use for thi| 0000bee0 73 20 6f 70 74 69 6f 6e 2c 20 61 73 20 74 68 65 |s option, as the| 0000bef0 20 74 69 6d 65 20 74 61 6b 65 6e 20 74 6f 20 73 | time taken to s| 0000bf00 63 72 6f 6c 6c 20 74 68 65 20 73 63 72 65 65 6e |croll the screen| 0000bf10 20 74 61 6b 65 73 20 66 61 72 20 74 6f 6f 20 6c | takes far too l| 0000bf20 6f 6e 67 2e 0a 0a 35 2e 34 2e 33 20 4c 6f 67 0a |ong...5.4.3 Log.| 0000bf30 0a 0a 0a 2d 44 41 54 41 09 09 6c 6f 67 20 6c 69 |...-DATA..log li| 0000bf40 6e 65 73 20 63 6f 6e 74 61 69 6e 69 6e 67 20 44 |nes containing D| 0000bf50 41 54 41 20 28 4f 4e 29 0a 0a 2d 45 56 41 4c 09 |ATA (ON)..-EVAL.| 0000bf60 09 6c 6f 67 20 6c 69 6e 65 73 20 63 6f 6e 74 61 |.log lines conta| 0000bf70 69 6e 69 6e 67 20 45 56 41 4c 20 28 4f 4e 29 0a |ining EVAL (ON).| 0000bf80 0a 2d 47 6f 74 6f 09 09 6c 6f 67 20 6c 69 6e 65 |.-Goto..log line| 0000bf90 73 20 63 6f 6e 74 61 69 6e 69 6e 67 20 6c 69 6e |s containing lin| 0000bfa0 65 20 6e 75 6d 62 65 72 73 20 28 4f 4e 29 0a 0a |e numbers (ON)..| 0000bfb0 2d 4c 69 73 74 09 09 65 63 68 6f 20 69 6e 70 75 |-List..echo inpu| 0000bfc0 74 20 74 6f 20 6c 6f 67 20 28 4f 46 46 29 0a 0a |t to log (OFF)..| 0000bfd0 2d 4c 6f 67 20 3c 66 69 6c 65 3e 09 6f 75 74 70 |-Log <file>.outp| 0000bfe0 75 74 20 66 69 6c 65 20 28 73 65 65 20 42 61 73 |ut file (see Bas| 0000bff0 43 6f 6d 70 72 65 73 73 24 4c 6f 67 29 0a 0a 2d |Compress$Log)..-| 0000c000 52 45 41 44 09 09 6c 6f 67 20 6c 69 6e 65 73 20 |READ..log lines | 0000c010 63 6f 6e 74 61 69 6e 69 6e 67 20 52 45 41 44 20 |containing READ | 0000c020 28 4f 4e 29 0a 0a 2d 53 74 61 74 73 09 09 6c 6f |(ON)..-Stats..lo| 0000c030 67 20 70 72 6f 67 72 61 6d 20 73 74 61 74 69 73 |g program statis| 0000c040 74 69 63 73 20 28 4f 4e 29 0a 0a 35 2e 34 2e 34 |tics (ON)..5.4.4| 0000c050 20 53 70 65 63 69 61 6c 0a 0a 0a 0a 2d 53 70 65 | Special....-Spe| 0000c060 63 69 61 6c 20 3c 66 69 6c 65 73 3e 09 75 73 65 |cial <files>.use| 0000c070 20 63 6f 6d 6d 61 20 6c 69 73 74 20 6f 66 20 3c | comma list of <| 0000c080 66 69 6c 65 3e 20 74 6f 20 72 65 73 6f 6c 76 65 |file> to resolve| 0000c090 20 69 6d 70 6c 69 63 69 74 20 75 73 61 67 65 73 | implicit usages| 0000c0a0 20 28 73 65 65 20 42 61 73 43 6f 6d 70 72 65 73 | (see BasCompres| 0000c0b0 73 24 53 70 65 63 69 61 6c 20 61 6e 64 20 42 61 |s$Special and Ba| 0000c0c0 73 43 6f 6d 70 72 65 73 73 24 50 61 74 68 29 0a |sCompress$Path).| 0000c0d0 0a 2d 55 6e 75 73 65 64 53 09 72 65 70 6f 72 74 |.-UnusedS.report| 0000c0e0 20 75 6e 64 65 66 69 6e 65 64 20 73 70 65 63 69 | undefined speci| 0000c0f0 61 6c 20 72 6f 75 74 69 6e 65 73 20 28 4f 46 46 |al routines (OFF| 0000c100 29 0a 0a 2d 57 53 70 4c 61 62 65 6c 09 72 65 70 |)..-WSpLabel.rep| 0000c110 6f 72 74 20 6c 61 62 65 6c 20 65 78 70 61 6e 73 |ort label expans| 0000c120 69 6f 6e 20 72 65 73 75 6c 74 73 20 28 4f 46 46 |ion results (OFF| 0000c130 29 0a 0a 35 2e 34 2e 35 20 43 72 6f 73 73 2d 72 |)..5.4.5 Cross-r| 0000c140 65 66 65 72 65 6e 63 65 0a 0a 0a 0a 2d 58 52 65 |eference....-XRe| 0000c150 66 46 69 6c 65 20 3c 66 69 6c 65 3e 09 6f 75 74 |fFile <file>.out| 0000c160 70 75 74 20 66 69 6c 65 20 28 73 65 65 20 42 61 |put file (see Ba| 0000c170 73 43 6f 6d 70 72 65 73 73 24 58 52 65 66 29 0a |sCompress$XRef).| 0000c180 0a 35 2e 34 2e 35 2e 31 20 57 68 61 74 0a 0a 0a |.5.4.5.1 What...| 0000c190 0a 2d 44 65 6c 65 74 65 64 09 78 72 65 66 20 69 |.-Deleted.xref i| 0000c1a0 6e 63 6c 75 64 65 73 20 64 65 6c 65 74 65 64 20 |ncludes deleted | 0000c1b0 76 61 72 69 61 62 6c 65 73 20 61 6e 64 20 72 6f |variables and ro| 0000c1c0 75 74 69 6e 65 73 20 28 4f 46 46 29 0a 0a 2d 58 |utines (OFF)..-X| 0000c1d0 49 6e 63 56 61 72 20 3c 74 79 70 65 3e 0a 0a 2d |IncVar <type>..-| 0000c1e0 58 49 6e 63 52 74 6e 20 3c 74 79 70 65 3e 0a 0a |XIncRtn <type>..| 0000c1f0 2d 58 49 6e 63 20 3c 74 79 70 65 3e 09 78 72 65 |-XInc <type>.xre| 0000c200 66 20 74 68 65 73 65 20 74 79 70 65 73 20 6f 66 |f these types of| 0000c210 20 6c 61 62 65 6c 73 20 28 69 72 73 49 52 53 70 | labels (irsIRSp| 0000c220 66 29 20 a7 33 2e 31 2e 31 0a 0a 0a 0a 3c 74 79 |f) .3.1.1....<ty| 0000c230 70 65 3e 20 69 73 20 61 20 73 74 72 69 6e 67 20 |pe> is a string | 0000c240 6f 66 20 74 68 65 73 65 20 6c 65 74 74 65 72 73 |of these letters| 0000c250 3a 0a 0a 09 70 09 70 72 6f 63 65 64 75 72 65 0a |:...p.procedure.| 0000c260 0a 09 66 09 66 75 6e 63 74 69 6f 6e 0a 0a 09 72 |..f.function...r| 0000c270 09 72 65 61 6c 20 76 61 72 69 61 62 6c 65 0a 0a |.real variable..| 0000c280 09 69 09 69 6e 74 65 67 65 72 20 76 61 72 69 61 |.i.integer varia| 0000c290 62 6c 65 0a 0a 09 73 09 73 74 72 69 6e 67 20 76 |ble...s.string v| 0000c2a0 61 72 69 61 62 6c 65 0a 0a 09 52 09 72 65 61 6c |ariable...R.real| 0000c2b0 20 61 72 72 61 79 20 76 61 72 69 61 62 6c 65 0a | array variable.| 0000c2c0 0a 09 49 09 69 6e 74 65 67 65 72 20 61 72 72 61 |..I.integer arra| 0000c2d0 79 20 76 61 72 69 61 62 6c 65 0a 0a 09 53 09 73 |y variable...S.s| 0000c2e0 74 72 69 6e 67 20 61 72 72 61 79 20 76 61 72 69 |tring array vari| 0000c2f0 61 62 6c 65 0a 0a 35 2e 34 2e 35 2e 32 20 48 6f |able..5.4.5.2 Ho| 0000c300 77 20 6d 75 63 68 0a 0a 0a 0a 2d 58 52 65 66 20 |w much....-XRef | 0000c310 3c 6e 3e 09 6c 65 76 65 6c 20 6f 66 20 78 72 65 |<n>.level of xre| 0000c320 66 20 64 65 74 61 69 6c 20 66 6f 72 20 62 6f 74 |f detail for bot| 0000c330 68 20 72 6f 75 74 69 6e 65 73 20 61 6e 64 20 76 |h routines and v| 0000c340 61 72 69 61 62 6c 65 73 20 a7 33 2e 32 0a 0a 2d |ariables .3.2..-| 0000c350 58 52 74 6e 20 3c 6e 3e 09 6c 65 76 65 6c 20 6f |XRtn <n>.level o| 0000c360 66 20 78 72 65 66 20 64 65 74 61 69 6c 20 66 6f |f xref detail fo| 0000c370 72 20 72 6f 75 74 69 6e 65 73 20 28 30 29 0a 0a |r routines (0)..| 0000c380 2d 58 56 61 72 20 3c 6e 3e 09 6c 65 76 65 6c 20 |-XVar <n>.level | 0000c390 6f 66 20 78 72 65 66 20 64 65 74 61 69 6c 20 66 |of xref detail f| 0000c3a0 6f 72 20 76 61 72 69 61 62 6c 65 73 20 28 30 29 |or variables (0)| 0000c3b0 0a 0a 0a 0a 3c 6e 3e 20 65 76 61 6c 75 61 74 65 |....<n> evaluate| 0000c3c0 73 20 74 6f 20 61 20 6e 75 6d 62 65 72 20 66 72 |s to a number fr| 0000c3d0 6f 6d 20 30 20 74 6f 20 34 3a 0a 0a 09 30 09 4e |om 0 to 4:...0.N| 0000c3e0 6f 6e 65 0a 0a 09 31 09 45 78 69 73 74 65 6e 63 |one...1.Existenc| 0000c3f0 65 20 2d 20 6e 61 6d 65 0a 0a 09 32 09 47 6c 6f |e - name...2.Glo| 0000c400 62 61 6c 20 2d 20 6e 61 6d 65 20 2f 20 63 6f 75 |bal - name / cou| 0000c410 6e 74 0a 0a 09 33 09 52 6f 75 74 69 6e 65 20 2d |nt...3.Routine -| 0000c420 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 72 6f | reference to ro| 0000c430 75 74 69 6e 65 20 6c 65 76 65 6c 0a 0a 09 34 09 |utine level...4.| 0000c440 4c 69 6e 65 20 2d 20 72 65 66 65 72 65 6e 63 65 |Line - reference| 0000c450 20 74 6f 20 6c 69 6e 65 20 6c 65 76 65 6c 0a 0a | to line level..| 0000c460 35 2e 34 2e 35 2e 33 20 4f 72 64 65 72 0a 0a 0a |5.4.5.3 Order...| 0000c470 0a 2d 53 6f 72 74 20 3c 73 6f 72 74 3e 09 6f 72 |.-Sort <sort>.or| 0000c480 64 65 72 20 6f 66 20 61 6c 6c 20 76 61 72 69 61 |der of all varia| 0000c490 62 6c 65 2c 20 72 6f 75 74 69 6e 65 2c 20 61 6e |ble, routine, an| 0000c4a0 64 20 72 65 66 65 72 65 6e 63 65 20 73 6f 72 74 |d reference sort| 0000c4b0 69 6e 67 20 a7 33 2e 33 0a 0a 2d 53 52 65 66 20 |ing .3.3..-SRef | 0000c4c0 3c 73 6f 72 74 3e 09 6f 72 64 65 72 20 6f 66 20 |<sort>.order of | 0000c4d0 63 72 6f 73 73 97 72 65 66 65 72 65 6e 63 65 73 |cross.references| 0000c4e0 20 28 4e 54 50 29 0a 0a 2d 53 52 74 6e 20 3c 73 | (NTP)..-SRtn <s| 0000c4f0 6f 72 74 3e 09 6f 72 64 65 72 20 6f 66 20 72 6f |ort>.order of ro| 0000c500 75 74 69 6e 65 73 20 28 54 4e 29 0a 0a 2d 53 56 |utines (TN)..-SV| 0000c510 61 72 20 3c 73 6f 72 74 3e 09 6f 72 64 65 72 20 |ar <sort>.order | 0000c520 6f 66 20 76 61 72 69 61 62 6c 65 73 20 28 54 4e |of variables (TN| 0000c530 29 0a 0a 0a 0a 3c 73 6f 72 74 3e 20 69 73 20 61 |)....<sort> is a| 0000c540 20 73 74 72 69 6e 67 20 6f 66 20 74 68 65 73 65 | string of these| 0000c550 20 6c 65 74 74 65 72 73 3a 0a 0a 09 4e 09 73 6f | letters:...N.so| 0000c560 72 74 20 62 79 20 6e 61 6d 65 0a 0a 09 54 09 73 |rt by name...T.s| 0000c570 6f 72 74 20 62 79 20 74 79 70 65 0a 0a 09 44 09 |ort by type...D.| 0000c580 73 6f 72 74 20 62 79 20 6e 61 6d 65 20 28 69 6e |sort by name (in| 0000c590 20 64 69 63 74 69 6f 6e 61 72 79 20 73 65 6e 73 | dictionary sens| 0000c5a0 65 29 0a 0a 09 50 09 73 6f 72 74 20 62 79 20 70 |e)...P.sort by p| 0000c5b0 6f 73 69 74 69 6f 6e 20 69 6e 20 73 6f 75 72 63 |osition in sourc| 0000c5c0 65 0a 0a 09 55 09 73 6f 72 74 20 62 79 20 75 73 |e...U.sort by us| 0000c5d0 61 67 65 0a 0a 65 2e 67 2e 20 74 6f 20 73 6f 72 |age..e.g. to sor| 0000c5e0 74 20 62 79 20 75 73 61 67 65 2c 20 6e 61 6d 65 |t by usage, name| 0000c5f0 2c 20 74 68 65 6e 20 74 79 70 65 20 3d 20 94 55 |, then type = .U| 0000c600 4e 54 95 2e 0a 0a 4c 6f 77 65 72 20 63 61 73 65 |NT....Lower case| 0000c610 20 6c 65 74 74 65 72 73 20 6f 72 64 65 72 20 74 | letters order t| 0000c620 6f 70 20 74 6f 20 62 6f 74 74 6f 6d 2e 0a 0a 35 |op to bottom...5| 0000c630 2e 35 20 45 72 72 6f 72 20 68 61 6e 64 6c 69 6e |.5 Error handlin| 0000c640 67 0a 0a 42 79 20 65 72 72 6f 72 73 2c 20 69 74 |g..By errors, it| 0000c650 20 69 73 20 6d 65 61 6e 74 20 73 79 73 74 65 6d | is meant system| 0000c660 20 65 72 72 6f 72 73 20 28 69 2e 65 2e 20 74 68 | errors (i.e. th| 0000c670 6f 73 65 20 67 65 6e 65 72 61 74 65 64 20 62 79 |ose generated by| 0000c680 20 63 61 6c 6c 73 20 74 6f 20 74 68 65 20 6f 70 | calls to the op| 0000c690 65 72 61 74 69 6e 67 20 73 79 73 74 65 6d 29 2e |erating system).| 0000c6a0 0a 0a 41 64 6d 69 74 74 65 64 6c 79 2c 20 65 72 |..Admittedly, er| 0000c6b0 72 6f 72 20 68 61 6e 64 6c 69 6e 67 20 69 73 20 |ror handling is | 0000c6c0 71 75 69 74 65 20 70 72 69 6d 69 74 69 76 65 20 |quite primitive | 0000c6d0 69 6e 20 42 61 73 43 6f 6d 70 72 65 73 73 2e 20 |in BasCompress. | 0000c6e0 20 41 6c 6c 20 63 61 6c 6c 73 20 74 6f 20 74 68 | All calls to th| 0000c6f0 65 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 |e operating syst| 0000c700 65 6d 20 61 72 65 20 74 65 73 74 65 64 20 66 6f |em are tested fo| 0000c710 72 20 65 72 72 6f 72 20 63 6f 6e 64 69 74 69 6f |r error conditio| 0000c720 6e 2c 20 61 6e 64 20 69 66 20 73 65 74 20 74 68 |n, and if set th| 0000c730 69 73 20 69 73 20 69 6d 6d 65 64 69 61 74 65 6c |is is immediatel| 0000c740 79 20 70 72 6f 70 61 67 61 74 65 64 20 61 6c 6c |y propagated all| 0000c750 20 74 68 65 20 77 61 79 20 62 61 63 6b 20 74 6f | the way back to| 0000c760 20 74 68 65 20 75 73 65 72 2c 20 77 69 74 68 20 | the user, with | 0000c770 61 6e 20 61 70 70 72 6f 70 72 69 61 74 65 20 6d |an appropriate m| 0000c780 65 73 73 61 67 65 20 64 75 6d 70 65 64 20 69 6e |essage dumped in| 0000c790 20 74 68 65 20 6c 6f 67 20 66 69 6c 65 2e 0a 0a | the log file...| 0000c7a0 45 72 72 6f 72 73 20 6f 63 63 75 72 72 69 6e 67 |Errors occurring| 0000c7b0 20 62 65 66 6f 72 65 20 74 68 65 20 6c 6f 67 20 | before the log | 0000c7c0 66 69 6c 65 20 69 73 20 6f 70 65 6e 65 64 20 61 |file is opened a| 0000c7d0 72 65 20 72 65 70 6f 72 74 65 64 20 74 6f 20 74 |re reported to t| 0000c7e0 68 65 20 73 63 72 65 65 6e 2e 0a 0a 49 6e 20 61 |he screen...In a| 0000c7f0 6e 79 20 63 61 73 65 2c 20 61 6e 20 65 72 72 6f |ny case, an erro| 0000c800 72 20 73 61 66 65 6c 79 20 63 6c 6f 73 65 73 20 |r safely closes | 0000c810 61 6c 6c 20 66 69 6c 65 73 20 6f 70 65 6e 65 64 |all files opened| 0000c820 20 62 79 20 74 68 69 73 20 61 70 70 6c 69 63 61 | by this applica| 0000c830 74 69 6f 6e 2e 0a 0a 35 2e 36 20 45 73 63 61 70 |tion...5.6 Escap| 0000c840 65 20 68 61 6e 64 6c 69 6e 67 0a 0a 41 73 20 77 |e handling..As w| 0000c850 69 74 68 20 65 72 72 6f 72 20 68 61 6e 64 6c 69 |ith error handli| 0000c860 6e 67 2c 20 74 68 69 73 20 69 73 20 66 61 69 72 |ng, this is fair| 0000c870 6c 79 20 70 72 69 6d 69 74 69 76 65 2e 0a 0a 42 |ly primitive...B| 0000c880 61 73 43 6f 6d 70 72 65 73 73 20 63 61 6e 20 62 |asCompress can b| 0000c890 65 20 61 62 6f 72 74 65 64 20 61 74 20 61 6e 79 |e aborted at any| 0000c8a0 20 74 69 6d 65 2c 20 74 65 72 6d 69 6e 61 74 69 | time, terminati| 0000c8b0 6e 67 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 61 |ng immediately a| 0000c8c0 66 74 65 72 20 63 6c 6f 73 69 6e 67 20 61 6c 6c |fter closing all| 0000c8d0 20 6f 70 65 6e 20 66 69 6c 65 73 2e 0a 0a 4e 6f | open files...No| 0000c8e0 74 65 20 74 68 61 74 20 64 75 72 69 6e 67 20 74 |te that during t| 0000c8f0 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 70 72 6f |he middle of pro| 0000c900 67 72 61 6d 20 6f 75 74 70 75 74 20 74 68 65 20 |gram output the | 0000c910 42 61 73 69 63 20 66 69 6c 65 20 77 69 6c 6c 20 |Basic file will | 0000c920 62 65 20 54 79 70 65 27 64 20 74 6f 20 44 61 74 |be Type'd to Dat| 0000c930 61 2c 20 61 73 20 61 20 73 61 66 65 67 75 61 72 |a, as a safeguar| 0000c940 64 20 61 67 61 69 6e 73 74 20 6c 6f 61 64 69 6e |d against loadin| 0000c950 67 20 69 74 20 69 6e 74 6f 20 42 61 73 69 63 56 |g it into BasicV| 0000c960 2e 20 20 28 54 68 69 73 20 64 6f 65 73 20 6e 6f |. (This does no| 0000c970 74 20 68 61 6e 64 6c 65 20 7a 65 72 6f 2d 6c 65 |t handle zero-le| 0000c980 6e 67 74 68 20 66 69 6c 65 73 20 76 65 72 79 20 |ngth files very | 0000c990 77 65 6c 6c 20 2d 20 69 74 20 68 61 6e 67 73 20 |well - it hangs | 0000c9a0 74 68 65 20 6d 61 63 68 69 6e 65 29 2e 0a 0a 35 |the machine)...5| 0000c9b0 2e 37 20 48 6f 75 72 67 6c 61 73 73 0a 0a 54 68 |.7 Hourglass..Th| 0000c9c0 65 20 68 6f 75 72 67 6c 61 73 73 20 69 73 20 75 |e hourglass is u| 0000c9d0 73 65 64 20 74 6f 20 69 6e 64 69 63 61 74 65 20 |sed to indicate | 0000c9e0 42 61 73 43 6f 6d 70 72 65 73 73 27 73 20 70 72 |BasCompress's pr| 0000c9f0 6f 67 72 65 73 73 2e 0a 0a 44 75 72 69 6e 67 20 |ogress...During | 0000ca00 70 61 72 73 69 6e 67 2c 20 74 68 65 20 70 65 72 |parsing, the per| 0000ca10 63 65 6e 74 61 67 65 20 73 68 6f 77 73 20 68 6f |centage shows ho| 0000ca20 77 20 6d 75 63 68 20 68 61 73 20 61 6c 72 65 61 |w much has alrea| 0000ca30 64 79 20 62 65 65 6e 20 61 6e 61 6c 79 73 65 64 |dy been analysed| 0000ca40 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 62 65 63 |. Note that bec| 0000ca50 61 75 73 65 20 42 61 73 43 6f 6d 70 72 65 73 73 |ause BasCompress| 0000ca60 20 63 61 6e 20 6e 6f 74 20 6b 6e 6f 77 20 74 68 | can not know th| 0000ca70 65 20 74 6f 74 61 6c 20 6c 65 6e 67 74 68 20 6f |e total length o| 0000ca80 66 20 69 6e 70 75 74 20 62 65 66 6f 72 65 68 61 |f input beforeha| 0000ca90 6e 64 2c 20 74 68 65 20 70 65 72 63 65 6e 74 61 |nd, the percenta| 0000caa0 67 65 20 6d 61 79 20 61 63 74 75 61 6c 6c 79 20 |ge may actually | 0000cab0 67 6f 20 62 61 63 6b 77 61 72 64 73 20 61 73 20 |go backwards as | 0000cac0 4c 49 42 52 41 52 59 20 73 74 61 74 65 6d 65 6e |LIBRARY statemen| 0000cad0 74 73 20 61 72 65 20 70 61 72 73 65 64 2e 0a 0a |ts are parsed...| 0000cae0 44 75 72 69 6e 67 20 63 72 6f 73 73 20 72 65 66 |During cross ref| 0000caf0 65 72 65 6e 63 69 6e 67 2c 20 74 68 65 72 65 20 |erencing, there | 0000cb00 69 73 20 6e 6f 20 70 65 72 63 65 6e 74 61 67 65 |is no percentage| 0000cb10 2c 20 62 75 74 20 74 68 65 20 62 6f 74 74 6f 6d |, but the bottom| 0000cb20 20 4c 2e 45 2e 44 2e 20 69 73 20 6f 6e 2e 0a 0a | L.E.D. is on...| 0000cb30 46 69 6e 61 6c 6c 79 2c 20 64 75 72 69 6e 67 20 |Finally, during | 0000cb40 70 72 6f 67 72 61 6d 20 6f 75 74 70 75 74 20 61 |program output a| 0000cb50 6e 20 61 63 63 75 72 61 74 65 20 70 65 72 63 65 |n accurate perce| 0000cb60 6e 74 61 67 65 20 69 73 20 64 69 73 70 6c 61 79 |ntage is display| 0000cb70 65 64 2c 20 77 69 74 68 20 74 68 65 20 74 6f 70 |ed, with the top| 0000cb80 20 4c 2e 45 2e 44 2e 20 6f 6e 2e 0a 0a 0c 0a 0a | L.E.D. on......| 0000cb90 36 20 53 70 65 63 69 61 6c 20 66 69 6c 65 73 0a |6 Special files.| 0000cba0 0a 54 68 69 73 20 63 68 61 70 74 65 72 20 65 78 |.This chapter ex| 0000cbb0 70 6c 61 69 6e 73 20 74 68 65 20 66 6f 72 6d 61 |plains the forma| 0000cbc0 74 20 6f 66 20 74 68 65 20 53 70 65 63 69 61 6c |t of the Special| 0000cbd0 20 66 69 6c 65 73 2e 20 20 54 68 65 73 65 20 61 | files. These a| 0000cbe0 72 65 20 61 75 78 69 6c 69 61 72 79 20 54 65 78 |re auxiliary Tex| 0000cbf0 74 20 66 69 6c 65 73 20 75 73 65 64 20 74 6f 20 |t files used to | 0000cc00 67 69 76 65 20 42 61 73 43 6f 6d 70 72 65 73 73 |give BasCompress| 0000cc10 20 73 6f 6d 65 20 6d 6f 72 65 20 69 6e 66 6f 72 | some more infor| 0000cc20 6d 61 74 69 6f 6e 20 74 6f 20 68 65 6c 70 20 69 |mation to help i| 0000cc30 74 20 63 6f 6d 70 72 65 73 73 20 62 65 74 74 65 |t compress bette| 0000cc40 72 2e 20 20 53 65 65 20 61 6c 73 6f 20 74 68 65 |r. See also the| 0000cc50 20 65 78 61 6d 70 6c 65 73 20 73 75 70 70 6c 69 | examples suppli| 0000cc60 65 64 20 6f 6e 20 64 69 73 63 2e 0a 0a 36 2e 31 |ed on disc...6.1| 0000cc70 20 57 68 79 0a 0a 53 70 65 63 69 61 6c 20 66 69 | Why..Special fi| 0000cc80 6c 65 73 20 61 72 65 20 75 73 65 64 20 74 6f 20 |les are used to | 0000cc90 74 65 6c 6c 20 42 61 73 43 6f 6d 70 72 65 73 73 |tell BasCompress| 0000cca0 20 68 6f 77 20 74 6f 20 63 6f 70 65 20 77 69 74 | how to cope wit| 0000ccb0 68 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 |h the following | 0000ccc0 74 79 70 65 73 20 6f 66 20 73 69 74 75 61 74 69 |types of situati| 0000ccd0 6f 6e 3a 0a 0a 09 8f 09 45 56 41 4c 28 22 56 61 |on:.....EVAL("Va| 0000cce0 72 69 61 62 6c 65 22 29 0a 0a 09 8f 09 44 41 54 |riable").....DAT| 0000ccf0 41 20 56 61 72 69 61 62 6c 65 0a 0a 09 8f 09 4c |A Variable.....L| 0000cd00 49 42 52 41 52 59 20 22 25 2e 22 2b 20 52 6f 75 |IBRARY "%."+ Rou| 0000cd10 74 69 6e 65 50 61 72 61 6d 65 74 65 72 24 0a 0a |tineParameter$..| 0000cd20 09 8f 09 45 56 41 4c 28 22 46 4e 5f 22 2b 20 52 |...EVAL("FN_"+ R| 0000cd30 6f 75 74 69 6e 65 50 61 72 61 6d 65 74 65 72 24 |outineParameter$| 0000cd40 29 0a 0a 42 65 63 61 75 73 65 20 42 61 73 43 6f |)..Because BasCo| 0000cd50 6d 70 72 65 73 73 20 72 65 64 75 63 65 73 20 6c |mpress reduces l| 0000cd60 61 62 65 6c 73 20 28 73 65 65 20 a7 32 2e 31 31 |abels (see .2.11| 0000cd70 29 20 75 73 69 6e 67 20 61 20 67 6c 6f 62 61 6c |) using a global| 0000cd80 20 63 6f 6e 74 65 78 74 2c 20 61 74 20 72 75 6e | context, at run| 0000cd90 2d 74 69 6d 65 20 77 68 65 6e 20 42 61 73 69 63 |-time when Basic| 0000cda0 56 20 74 72 69 65 73 20 74 6f 20 66 69 6e 64 20 |V tries to find | 0000cdb0 74 68 65 73 65 20 6c 61 62 65 6c 73 20 69 6e 20 |these labels in | 0000cdc0 74 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 74 |the current cont| 0000cdd0 65 78 74 2c 20 69 74 20 66 61 69 6c 73 2e 20 20 |ext, it fails. | 0000cde0 53 70 65 63 69 61 6c 20 66 69 6c 65 73 20 74 65 |Special files te| 0000cdf0 6c 6c 20 42 61 73 43 6f 6d 70 72 65 73 73 20 77 |ll BasCompress w| 0000ce00 68 69 63 68 20 6c 61 62 65 6c 73 20 6e 6f 74 20 |hich labels not | 0000ce10 74 6f 20 63 6f 6d 70 72 65 73 73 2c 20 65 69 74 |to compress, eit| 0000ce20 68 65 72 20 65 78 70 6c 69 63 69 74 6c 79 20 61 |her explicitly a| 0000ce30 73 20 69 6e 20 74 68 65 20 66 69 72 73 74 20 74 |s in the first t| 0000ce40 77 6f 20 63 61 73 65 73 20 6f 72 20 61 62 6f 76 |wo cases or abov| 0000ce50 65 2c 20 6f 72 20 69 6d 70 6c 69 63 69 74 6c 79 |e, or implicitly| 0000ce60 20 28 66 72 6f 6d 20 72 6f 75 74 69 6e 65 20 70 | (from routine p| 0000ce70 61 72 61 6d 65 74 65 72 73 29 20 61 73 20 69 6e |arameters) as in| 0000ce80 20 74 68 65 20 6c 61 74 65 72 20 74 77 6f 2e 0a | the later two..| 0000ce90 0a 36 2e 32 20 46 69 6c 65 73 0a 0a 53 70 65 63 |.6.2 Files..Spec| 0000cea0 69 61 6c 20 66 69 6c 65 73 20 61 72 65 20 6a 75 |ial files are ju| 0000ceb0 73 74 20 70 6c 61 69 6e 20 54 65 78 74 20 66 69 |st plain Text fi| 0000cec0 6c 65 73 2c 20 69 6e 20 74 68 65 20 66 6f 72 6d |les, in the form| 0000ced0 61 74 20 73 70 65 63 69 66 69 65 64 20 62 65 6c |at specified bel| 0000cee0 6f 77 2e 20 20 42 61 73 43 6f 6d 70 72 65 73 73 |ow. BasCompress| 0000cef0 20 61 6c 6c 6f 77 73 20 6d 6f 72 65 20 74 68 61 | allows more tha| 0000cf00 6e 20 6f 6e 65 20 53 70 65 63 69 61 6c 20 66 69 |n one Special fi| 0000cf10 6c 65 20 74 6f 20 62 65 20 64 65 66 69 6e 65 64 |le to be defined| 0000cf20 20 28 75 73 69 6e 67 20 61 20 63 6f 6d 6d 61 20 | (using a comma | 0000cf30 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 29 2c |separated list),| 0000cf40 20 62 75 74 20 69 74 20 69 73 20 66 61 72 20 65 | but it is far e| 0000cf50 61 73 69 65 72 20 74 6f 20 75 73 65 20 74 68 65 |asier to use the| 0000cf60 20 23 69 6e 63 6c 75 64 65 20 64 69 72 65 63 74 | #include direct| 0000cf70 69 76 65 20 69 6e 73 69 64 65 20 61 20 53 70 65 |ive inside a Spe| 0000cf80 63 69 61 6c 20 66 69 6c 65 2c 20 61 73 20 73 68 |cial file, as sh| 0000cf90 6f 77 6e 20 62 65 6c 6f 77 2e 0a 0a 53 70 65 63 |own below...Spec| 0000cfa0 69 61 6c 20 66 69 6c 65 73 20 61 72 65 20 66 6f |ial files are fo| 0000cfb0 75 6e 64 20 75 73 69 6e 67 20 74 68 65 20 65 6e |und using the en| 0000cfc0 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 |vironment variab| 0000cfd0 6c 65 20 42 61 73 43 6f 6d 70 72 65 73 73 24 50 |le BasCompress$P| 0000cfe0 61 74 68 2e 20 20 42 79 20 64 65 66 61 75 6c 74 |ath. By default| 0000cff0 20 74 68 69 73 20 69 73 20 6e 6f 74 20 73 65 74 | this is not set| 0000d000 20 75 70 2c 20 62 75 74 20 79 6f 75 20 6d 61 79 | up, but you may| 0000d010 20 6c 69 6b 65 20 74 6f 20 63 72 65 61 74 65 20 | like to create | 0000d020 61 20 73 75 62 2d 64 69 72 65 63 74 6f 72 79 20 |a sub-directory | 0000d030 42 41 73 63 6f 6d 70 72 65 73 73 20 69 6e 20 79 |BAscompress in y| 0000d040 6f 75 72 20 6c 69 62 72 61 72 79 20 61 6e 64 20 |our library and | 0000d050 73 65 74 20 74 68 69 73 20 76 61 72 69 61 62 6c |set this variabl| 0000d060 65 20 74 6f 20 22 2c 25 2e 42 41 73 63 6f 6d 70 |e to ",%.BAscomp| 0000d070 72 65 73 73 2e 22 20 69 6e 20 79 6f 75 72 20 62 |ress." in your b| 0000d080 6f 6f 74 2d 75 70 20 73 65 71 75 65 6e 63 65 20 |oot-up sequence | 0000d090 28 6e 6f 74 65 20 74 68 65 20 74 72 61 69 6c 69 |(note the traili| 0000d0a0 6e 67 20 64 6f 74 2c 20 61 73 20 77 69 74 68 20 |ng dot, as with | 0000d0b0 61 6c 6c 20 70 61 74 68 20 76 61 72 69 61 62 6c |all path variabl| 0000d0c0 65 73 29 2e 20 20 48 65 72 65 20 79 6f 75 20 77 |es). Here you w| 0000d0d0 6f 75 6c 64 20 6b 65 65 70 20 74 68 65 20 6f 6e |ould keep the on| 0000d0e0 65 20 6f 72 20 74 77 6f 20 73 70 65 63 69 61 6c |e or two special| 0000d0f0 20 66 69 6c 65 73 20 74 68 61 74 20 68 61 6e 64 | files that hand| 0000d100 6c 65 20 79 6f 75 72 20 70 61 72 74 69 63 75 6c |le your particul| 0000d110 61 72 20 73 65 74 20 6f 66 20 6c 69 62 72 61 72 |ar set of librar| 0000d120 79 20 66 69 6c 65 73 2c 20 61 6e 64 20 42 61 73 |y files, and Bas| 0000d130 43 6f 6d 70 72 65 73 73 20 77 69 6c 6c 20 66 69 |Compress will fi| 0000d140 6e 64 20 74 68 65 6d 20 66 6f 72 20 79 6f 75 20 |nd them for you | 0000d150 77 69 74 68 6f 75 74 20 79 6f 75 20 68 61 76 69 |without you havi| 0000d160 6e 67 20 74 6f 20 74 79 70 65 20 69 6e 20 61 20 |ng to type in a | 0000d170 66 75 6c 6c 20 70 61 74 68 6e 61 6d 65 20 65 76 |full pathname ev| 0000d180 65 72 79 20 74 69 6d 65 2e 0a 0a 36 2e 33 20 46 |ery time...6.3 F| 0000d190 6f 72 6d 61 74 0a 0a 54 68 65 20 66 6f 72 6d 61 |ormat..The forma| 0000d1a0 74 20 6f 66 20 61 20 53 70 65 63 69 61 6c 20 66 |t of a Special f| 0000d1b0 69 6c 65 20 69 73 20 66 61 69 72 6c 79 20 73 69 |ile is fairly si| 0000d1c0 6d 70 6c 65 2e 0a 0a 42 61 73 69 63 61 6c 6c 79 |mple...Basically| 0000d1d0 2c 20 28 66 6f 72 20 76 61 72 69 61 62 6c 65 73 |, (for variables| 0000d1e0 29 20 61 6c 6c 20 79 6f 75 27 72 65 20 74 72 79 |) all you're try| 0000d1f0 69 6e 67 20 74 6f 20 74 65 6c 6c 20 42 61 73 43 |ing to tell BasC| 0000d200 6f 6d 70 72 65 73 73 20 69 73 3a 0a 0a 09 8f 09 |ompress is:.....| 0000d210 72 6f 75 74 69 6e 65 20 58 20 68 61 73 20 61 20 |routine X has a | 0000d220 73 74 72 69 6e 67 20 69 6e 20 70 61 72 61 6d 65 |string in parame| 0000d230 74 65 72 20 59 0a 0a 09 8f 09 69 6e 73 69 64 65 |ter Y.....inside| 0000d240 20 72 6f 75 74 69 6e 65 20 58 20 74 68 65 72 65 | routine X there| 0000d250 20 69 73 20 61 6e 20 45 56 41 4c 0a 0a 09 8f 09 | is an EVAL.....| 0000d260 74 68 69 73 20 63 6f 6e 73 74 72 75 63 74 73 20 |this constructs | 0000d270 61 20 6e 65 77 20 6c 61 62 65 6c 20 5a 20 66 72 |a new label Z fr| 0000d280 6f 6d 20 59 0a 0a 09 8f 09 64 6f 6e 27 74 20 72 |om Y.....don't r| 0000d290 65 64 75 63 65 20 74 68 69 73 20 6c 61 62 65 6c |educe this label| 0000d2a0 20 5a 0a 0a 53 6f 20 61 6c 6c 20 79 6f 75 20 64 | Z..So all you d| 0000d2b0 6f 20 69 73 20 67 69 76 65 20 74 68 65 20 6e 61 |o is give the na| 0000d2c0 6d 65 20 61 6e 64 20 65 78 70 65 63 74 65 64 20 |me and expected | 0000d2d0 70 61 72 61 6d 65 74 65 72 73 20 6f 66 20 61 20 |parameters of a | 0000d2e0 72 6f 75 74 69 6e 65 20 61 6e 64 20 74 65 6c 6c |routine and tell| 0000d2f0 20 42 61 73 43 6f 6d 70 72 65 73 73 20 68 6f 77 | BasCompress how| 0000d300 20 74 6f 20 63 6f 6e 73 74 72 75 63 74 20 6c 61 | to construct la| 0000d310 62 65 6c 20 5a 2e 0a 0a 36 2e 33 2e 31 20 52 6f |bel Z...6.3.1 Ro| 0000d320 75 74 69 6e 65 73 0a 0a 59 6f 75 20 67 69 76 65 |utines..You give| 0000d330 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 61 20 72 | the name of a r| 0000d340 6f 75 74 69 6e 65 20 62 79 3a 0a 0a 09 70 72 6f |outine by:...pro| 0000d350 63 65 64 75 72 65 20 66 6f 6f 28 31 29 0a 0a 6f |cedure foo(1)..o| 0000d360 72 2c 0a 0a 09 66 75 6e 63 74 69 6f 6e 20 62 61 |r,...function ba| 0000d370 72 28 2c 31 29 0a 0a 54 68 65 20 62 72 61 63 6b |r(,1)..The brack| 0000d380 65 74 73 20 61 72 65 20 6e 65 63 65 73 73 61 72 |ets are necessar| 0000d390 79 20 69 66 20 61 20 72 6f 75 74 69 6e 65 20 64 |y if a routine d| 0000d3a0 6f 65 73 6e 27 74 20 68 61 76 65 20 61 6e 79 20 |oesn't have any | 0000d3b0 70 61 72 61 6d 65 74 65 72 73 2e 0a 0a 54 68 65 |parameters...The| 0000d3c0 20 70 72 6f 63 65 64 75 72 65 20 64 65 66 69 6e | procedure defin| 0000d3d0 69 74 69 6f 6e 20 61 62 6f 76 65 20 74 65 6c 6c |ition above tell| 0000d3e0 73 20 42 61 73 43 6f 6d 70 72 65 73 73 20 74 6f |s BasCompress to| 0000d3f0 20 65 78 70 65 63 74 20 61 20 28 73 69 6d 70 6c | expect a (simpl| 0000d400 65 29 20 73 74 72 69 6e 67 20 65 78 70 72 65 73 |e) string expres| 0000d410 73 69 6f 6e 20 74 6f 20 62 65 20 70 61 73 73 65 |sion to be passe| 0000d420 64 20 74 6f 20 74 68 65 20 70 72 6f 63 65 64 75 |d to the procedu| 0000d430 72 65 20 66 6f 6f 20 61 74 20 65 76 65 72 79 20 |re foo at every | 0000d440 63 61 6c 6c 2c 20 61 73 20 74 68 65 20 73 6f 6c |call, as the sol| 0000d450 65 20 70 61 72 61 6d 65 74 65 72 2e 20 20 54 68 |e parameter. Th| 0000d460 65 20 66 75 6e 63 74 69 6f 6e 20 64 65 66 69 6e |e function defin| 0000d470 69 74 69 6f 6e 20 73 61 79 73 20 74 68 65 20 66 |ition says the f| 0000d480 69 72 73 74 20 70 61 72 61 6d 65 74 65 72 20 69 |irst parameter i| 0000d490 73 20 6e 6f 74 20 69 6d 70 6f 72 74 61 6e 74 2c |s not important,| 0000d4a0 20 62 75 74 20 74 68 65 20 73 65 63 6f 6e 64 20 | but the second | 0000d4b0 70 61 72 61 6d 65 74 65 72 20 77 69 6c 6c 20 62 |parameter will b| 0000d4c0 65 20 61 20 73 69 6d 70 6c 65 20 73 74 72 69 6e |e a simple strin| 0000d4d0 67 2e 0a 0a 54 68 65 73 65 20 70 72 6f 74 6f 74 |g...These protot| 0000d4e0 79 70 65 73 20 61 72 65 20 63 68 65 63 6b 65 64 |ypes are checked| 0000d4f0 20 61 67 61 69 6e 73 74 20 77 68 61 74 20 69 73 | against what is| 0000d500 20 61 63 74 75 61 6c 6c 79 20 66 6f 75 6e 64 20 | actually found | 0000d510 69 6e 20 74 68 65 20 70 72 6f 67 72 61 6d 20 70 |in the program p| 0000d520 72 6f 70 65 72 2c 20 61 6e 64 20 61 6e 20 61 70 |roper, and an ap| 0000d530 70 72 6f 70 72 69 61 74 65 20 65 72 72 6f 72 20 |propriate error | 0000d540 67 65 6e 65 72 61 74 65 64 20 69 66 20 74 68 65 |generated if the| 0000d550 79 20 64 6f 6e 27 74 20 6d 61 74 63 68 2e 0a 0a |y don't match...| 0000d560 54 68 65 72 65 20 63 61 6e 20 62 65 20 75 70 20 |There can be up | 0000d570 74 6f 20 74 65 6e 20 64 69 73 74 69 6e 63 74 20 |to ten distinct | 0000d580 73 74 72 69 6e 67 20 70 61 72 61 6d 65 74 65 72 |string parameter| 0000d590 73 20 5b 30 2d 39 5d 2c 20 62 75 74 20 79 6f 75 |s [0-9], but you| 0000d5a0 27 6c 6c 20 70 72 6f 62 61 62 6c 79 20 6f 6e 6c |'ll probably onl| 0000d5b0 79 20 65 76 65 72 20 6e 65 65 64 20 6a 75 73 74 |y ever need just| 0000d5c0 20 6f 6e 65 2e 0a 0a 36 2e 33 2e 32 20 47 6c 6f | one...6.3.2 Glo| 0000d5d0 62 61 6c 73 0a 0a 53 6f 6d 65 74 69 6d 65 73 20 |bals..Sometimes | 0000d5e0 74 68 65 20 45 56 41 4c 20 69 73 6e 27 74 20 69 |the EVAL isn't i| 0000d5f0 6e 20 61 6e 79 20 70 61 72 74 69 63 75 6c 61 72 |n any particular| 0000d600 20 72 6f 75 74 69 6e 65 20 28 6f 72 20 69 73 20 | routine (or is | 0000d610 75 73 65 64 20 69 6e 73 69 64 65 20 61 20 6e 65 |used inside a ne| 0000d620 73 74 65 64 20 72 6f 75 74 69 6e 65 20 73 74 72 |sted routine str| 0000d630 75 63 74 75 72 65 20 6e 6f 74 20 61 6d 65 6e 61 |ucture not amena| 0000d640 62 6c 65 20 74 6f 20 74 68 65 20 61 62 6f 76 65 |ble to the above| 0000d650 20 73 69 6d 70 6c 69 66 69 63 61 74 69 6f 6e 29 | simplification)| 0000d660 2c 20 73 6f 20 79 6f 75 27 64 20 6c 69 6b 65 20 |, so you'd like | 0000d670 74 6f 20 67 69 76 65 20 74 68 65 20 6e 61 6d 65 |to give the name| 0000d680 20 6f 66 20 74 68 65 20 6c 61 62 65 6c 73 20 6e | of the labels n| 0000d690 6f 74 20 74 6f 20 72 65 64 75 63 65 20 6a 75 73 |ot to reduce jus| 0000d6a0 74 20 6f 6e 63 65 2e 20 20 54 68 69 73 20 69 73 |t once. This is| 0000d6b0 20 65 61 73 79 20 62 65 63 61 75 73 65 20 61 74 | easy because at| 0000d6c0 20 74 68 65 20 73 74 61 72 74 20 6f 66 20 65 61 | the start of ea| 0000d6d0 63 68 20 53 70 65 63 69 61 6c 20 66 69 6c 65 2c |ch Special file,| 0000d6e0 20 42 61 73 43 6f 6d 70 72 65 73 73 20 70 75 74 | BasCompress put| 0000d6f0 73 20 61 6e 20 69 6d 70 6c 69 63 69 74 20 64 65 |s an implicit de| 0000d700 63 6c 61 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 |claration of the| 0000d710 20 6d 61 69 6e 20 70 72 6f 67 72 61 6d 20 61 73 | main program as| 0000d720 20 61 20 72 6f 75 74 69 6e 65 2c 20 77 69 74 68 | a routine, with| 0000d730 20 6e 6f 20 70 61 72 61 6d 65 74 65 72 73 2e 20 | no parameters. | 0000d740 20 53 6f 20 79 6f 75 27 64 20 6a 75 73 74 20 73 | So you'd just s| 0000d750 74 61 72 74 20 64 65 66 69 6e 69 6e 67 20 74 68 |tart defining th| 0000d760 65 20 67 6c 6f 62 61 6c 20 6c 61 62 65 6c 73 20 |e global labels | 0000d770 61 73 20 6e 6f 72 6d 61 6c 20 72 6f 75 74 69 6e |as normal routin| 0000d780 65 20 6c 61 62 65 6c 73 2e 0a 0a 36 2e 33 2e 33 |e labels...6.3.3| 0000d790 20 4c 61 62 65 6c 73 0a 0a 46 69 72 73 74 20 6f | Labels..First o| 0000d7a0 66 20 61 6c 6c 20 61 6e 20 65 78 61 6d 70 6c 65 |f all an example| 0000d7b0 3a 0a 0a 09 50 52 4f 43 5f 4c 69 73 74 28 61 2c |:...PROC_List(a,| 0000d7c0 20 22 5a 61 70 70 61 22 2c 20 22 47 6f 6f 64 22 | "Zappa", "Good"| 0000d7d0 29 0a 0a 09 2e 2e 2e 0a 0a 09 3a 0a 0a 09 44 45 |).........:...DE| 0000d7e0 46 20 50 52 4f 43 5f 4c 69 73 74 28 52 45 54 55 |F PROC_List(RETU| 0000d7f0 52 4e 20 78 2c 20 79 24 2c 20 7a 24 29 0a 0a 09 |RN x, y$, z$)...| 0000d800 20 20 49 46 20 45 56 41 4c 28 22 46 72 61 6e 6b | IF EVAL("Frank| 0000d810 5f 22 2b 20 79 24 29 3c 3e 30 20 54 48 45 4e 0a |_"+ y$)<>0 THEN.| 0000d820 0a 09 09 20 20 78 20 2b 3d 20 45 56 41 4c 28 22 |... x += EVAL("| 0000d830 46 4e 5f 22 2b 20 7a 24 2b 20 22 5f 4e 61 6d 65 |FN_"+ z$+ "_Name| 0000d840 28 43 79 25 29 22 29 0a 0a 09 20 20 45 4e 44 49 |(Cy%)")... ENDI| 0000d850 46 0a 0a 09 45 4e 44 50 52 4f 43 0a 0a 74 68 69 |F...ENDPROC..thi| 0000d860 73 20 77 6f 75 6c 64 20 62 65 20 69 6d 70 6c 65 |s would be imple| 0000d870 6d 65 6e 74 65 64 20 61 73 3a 0a 0a 09 70 72 6f |mented as:...pro| 0000d880 63 65 64 75 72 65 20 5f 4c 69 73 74 28 2c 20 31 |cedure _List(, 1| 0000d890 2c 20 32 29 0a 0a 09 20 20 72 65 61 6c 20 46 72 |, 2)... real Fr| 0000d8a0 61 6e 6b 5f 5c 31 0a 0a 09 20 20 66 75 6e 63 74 |ank_\1... funct| 0000d8b0 69 6f 6e 20 5f 5c 32 5f 4e 61 6d 65 0a 0a 09 20 |ion _\2_Name... | 0000d8c0 20 69 6e 74 65 67 65 72 20 43 79 25 0a 0a 4e 6f | integer Cy%..No| 0000d8d0 74 65 20 74 68 65 20 73 70 61 63 65 73 20 74 6f |te the spaces to| 0000d8e0 20 74 68 65 20 6c 65 66 74 20 6f 66 20 74 68 65 | the left of the| 0000d8f0 20 69 6d 70 6c 69 63 69 74 20 64 65 63 6c 61 72 | implicit declar| 0000d900 61 74 69 6f 6e 73 2c 20 61 6e 64 20 74 68 65 20 |ations, and the | 0000d910 63 61 73 65 20 6f 66 20 74 68 65 20 6b 65 79 77 |case of the keyw| 0000d920 6f 72 64 73 20 61 73 20 62 6f 74 68 20 6f 66 20 |ords as both of | 0000d930 74 68 65 73 65 20 61 72 65 20 69 6d 70 6f 72 74 |these are import| 0000d940 61 6e 74 2e 20 20 41 6c 73 6f 20 6e 6f 74 65 20 |ant. Also note | 0000d950 74 68 65 20 6e 65 65 64 20 74 6f 20 64 65 63 6c |the need to decl| 0000d960 61 72 65 20 43 79 25 20 61 73 20 61 6e 6f 74 68 |are Cy% as anoth| 0000d970 65 72 20 76 61 72 69 61 62 6c 65 20 74 68 61 74 |er variable that| 0000d980 20 6d 75 73 74 20 6e 6f 74 20 62 65 20 73 68 6f | must not be sho| 0000d990 72 74 65 6e 65 64 2e 0a 0a 54 68 65 72 65 20 69 |rtened...There i| 0000d9a0 73 20 6e 6f 20 61 74 74 65 6d 70 74 20 74 6f 20 |s no attempt to | 0000d9b0 76 65 72 69 66 79 20 74 68 61 74 20 74 68 65 20 |verify that the | 0000d9c0 3c 6e 3e 20 75 73 65 64 20 77 61 73 20 64 65 63 |<n> used was dec| 0000d9d0 6c 61 72 65 64 20 69 6e 20 74 68 65 20 70 61 72 |lared in the par| 0000d9e0 61 6d 65 74 65 72 20 6c 69 73 74 2c 20 62 75 74 |ameter list, but| 0000d9f0 20 61 6c 6c 20 75 6e 64 65 63 6c 61 72 65 64 20 | all undeclared | 0000da00 3c 6e 3e 20 61 72 65 20 72 65 73 65 74 20 74 6f |<n> are reset to| 0000da10 20 74 68 65 20 65 6d 70 74 79 20 73 74 72 69 6e | the empty strin| 0000da20 67 2e 20 20 41 6c 73 6f 20 74 68 65 72 65 20 69 |g. Also there i| 0000da30 73 20 6f 6e 6c 79 20 72 75 64 69 6d 65 6e 74 61 |s only rudimenta| 0000da40 72 79 20 63 68 65 63 6b 69 6e 67 20 64 6f 6e 65 |ry checking done| 0000da50 20 6f 6e 20 74 68 65 20 65 78 70 61 6e 73 69 6f | on the expansio| 0000da60 6e 20 74 65 6d 70 6c 61 74 65 2c 20 73 6f 20 62 |n template, so b| 0000da70 65 20 73 65 6e 73 69 62 6c 65 2e 0a 0a 54 68 65 |e sensible...The| 0000da80 20 66 6f 6c 6c 6f 77 69 6e 67 20 74 61 62 6c 65 | following table| 0000da90 20 73 68 6f 77 73 20 74 68 65 20 65 78 61 63 74 | shows the exact| 0000daa0 20 77 6f 72 64 73 20 74 6f 20 75 73 65 20 2d 20 | words to use - | 0000dab0 6e 6f 74 65 20 74 68 65 79 20 6d 75 73 74 20 62 |note they must b| 0000dac0 65 20 6c 6f 77 65 72 20 63 61 73 65 3a 0a 0a 09 |e lower case:...| 0000dad0 72 65 61 6c 09 61 20 72 65 61 6c 20 76 61 72 69 |real.a real vari| 0000dae0 61 62 6c 65 20 65 2e 67 2e 20 70 69 5f 62 79 5f |able e.g. pi_by_| 0000daf0 32 0a 0a 09 69 6e 74 65 67 65 72 09 61 6e 20 69 |2...integer.an i| 0000db00 6e 74 65 67 65 72 20 76 61 72 69 61 62 6c 65 2c |nteger variable,| 0000db10 20 65 2e 67 2e 20 63 6f 75 6e 74 25 0a 0a 09 73 | e.g. count%...s| 0000db20 74 72 69 6e 67 09 61 20 73 74 72 69 6e 67 20 76 |tring.a string v| 0000db30 61 72 69 61 62 6c 65 2c 20 65 2e 67 20 6e 61 6d |ariable, e.g nam| 0000db40 65 24 0a 0a 09 72 65 61 6c 5f 61 72 72 61 79 09 |e$...real_array.| 0000db50 61 20 72 65 61 6c 20 61 72 72 61 79 20 76 61 72 |a real array var| 0000db60 69 61 62 6c 65 2c 20 65 2e 67 2e 20 74 69 6d 65 |iable, e.g. time| 0000db70 73 28 29 0a 0a 09 69 6e 74 65 67 65 72 5f 61 72 |s()...integer_ar| 0000db80 72 61 79 09 61 6e 20 69 6e 74 65 67 65 72 20 76 |ray.an integer v| 0000db90 61 72 69 61 62 6c 65 2c 20 65 2e 67 2e 20 62 6f |ariable, e.g. bo| 0000dba0 6f 6b 73 25 28 29 0a 0a 09 73 74 72 69 6e 67 5f |oks%()...string_| 0000dbb0 61 72 72 61 79 09 61 20 73 74 72 69 6e 67 20 76 |array.a string v| 0000dbc0 61 72 69 61 62 6c 65 2c 20 65 2e 67 2e 20 74 69 |ariable, e.g. ti| 0000dbd0 74 6c 65 73 24 28 29 0a 0a 09 70 72 6f 63 65 64 |tles$()...proced| 0000dbe0 75 72 65 09 61 20 70 72 6f 63 65 64 75 72 65 2c |ure.a procedure,| 0000dbf0 20 65 2e 67 2e 20 50 52 4f 43 5f 74 6f 74 61 6c | e.g. PROC_total| 0000dc00 0a 0a 09 66 75 6e 63 74 69 6f 6e 09 61 20 66 75 |...function.a fu| 0000dc10 6e 63 74 69 6f 6e 2c 20 65 2e 67 2e 20 46 4e 6d |nction, e.g. FNm| 0000dc20 69 6e 0a 0a 09 6c 69 62 72 61 72 79 09 6c 6f 61 |in...library.loa| 0000dc30 64 20 6c 69 62 72 61 72 79 20 66 69 6c 65 2c 20 |d library file, | 0000dc40 65 2e 67 2e 20 25 2e 57 69 6d 70 0a 0a 42 61 73 |e.g. %.Wimp..Bas| 0000dc50 43 6f 6d 70 72 65 73 73 20 63 61 6e 20 63 75 72 |Compress can cur| 0000dc60 72 65 6e 74 6c 79 20 69 6e 74 65 72 70 72 65 74 |rently interpret| 0000dc70 20 74 68 65 20 73 69 6d 70 6c 65 20 73 74 72 69 | the simple stri| 0000dc80 6e 67 20 69 6e 20 61 20 6e 75 6d 62 65 72 20 6f |ng in a number o| 0000dc90 66 20 77 61 79 73 2e 20 20 54 68 65 73 65 20 74 |f ways. These t| 0000dca0 65 6d 70 6c 61 74 65 20 65 78 70 61 6e 73 69 6f |emplate expansio| 0000dcb0 6e 20 74 79 70 65 73 20 61 72 65 3a 0a 0a 36 2e |n types are:..6.| 0000dcc0 33 2e 33 2e 31 20 56 65 72 62 61 74 69 6d 0a 0a |3.3.1 Verbatim..| 0000dcd0 5c 3c 6e 3e 09 63 61 75 73 65 73 20 74 68 65 20 |\<n>.causes the | 0000dce0 66 6f 72 6d 61 6c 20 70 61 72 61 6d 65 74 65 72 |formal parameter| 0000dcf0 20 3c 6e 3e 20 74 6f 20 62 65 20 73 75 62 73 74 | <n> to be subst| 0000dd00 69 74 75 74 65 64 20 76 65 72 62 61 74 69 6d 2e |ituted verbatim.| 0000dd10 0a 0a 36 2e 33 2e 33 2e 32 20 43 6f 6d 6d 61 20 |..6.3.3.2 Comma | 0000dd20 73 65 70 61 72 61 74 65 64 0a 0a 2c 3c 6e 3e 09 |separated..,<n>.| 0000dd30 74 72 65 61 74 73 20 70 61 72 61 6d 65 74 65 72 |treats parameter| 0000dd40 20 3c 6e 3e 20 61 73 20 61 20 63 6f 6d 6d 61 20 | <n> as a comma | 0000dd50 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f |separated list o| 0000dd60 66 20 73 74 72 69 6e 67 73 20 74 6f 20 73 75 62 |f strings to sub| 0000dd70 73 74 69 74 75 74 65 2c 20 77 69 74 68 20 6f 70 |stitute, with op| 0000dd80 74 69 6f 6e 61 6c 20 73 70 61 63 65 73 20 61 66 |tional spaces af| 0000dd90 74 65 72 20 65 61 63 68 20 63 6f 6d 6d 61 2e 0a |ter each comma..| 0000dda0 0a 45 61 63 68 20 76 61 6c 75 65 20 69 73 20 65 |.Each value is e| 0000ddb0 78 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 68 |xtracted from th| 0000ddc0 65 20 73 74 72 69 6e 67 20 69 6e 20 74 75 72 6e |e string in turn| 0000ddd0 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 |. Note that the| 0000dde0 20 73 74 72 69 6e 67 20 69 73 20 65 78 70 65 63 | string is expec| 0000ddf0 74 65 64 20 74 6f 20 63 6f 6e 74 61 69 6e 20 72 |ted to contain r| 0000de00 65 61 6c 20 76 61 72 69 61 62 6c 65 73 20 6f 6e |eal variables on| 0000de10 6c 79 2c 20 69 2e 65 2e 20 6e 6f 20 25 2c 20 24 |ly, i.e. no %, $| 0000de20 2c 20 6f 72 20 28 2e 0a 0a 46 6f 72 20 65 78 61 |, or (...For exa| 0000de30 6d 70 6c 65 3a 0a 0a 09 50 52 4f 43 5f 4d 75 73 |mple:...PROC_Mus| 0000de40 69 63 28 22 5a 61 70 70 61 2c 56 61 72 65 73 65 |ic("Zappa,Varese| 0000de50 2c 53 74 72 61 76 69 6e 73 6b 79 2c 42 65 6c 65 |,Stravinsky,Bele| 0000de60 77 29 0a 0a 09 2e 2e 2e 0a 0a 09 3a 0a 0a 09 44 |w).........:...D| 0000de70 45 46 20 50 52 4f 43 5f 4d 75 73 69 63 28 70 24 |EF PROC_Music(p$| 0000de80 29 0a 0a 09 4c 4f 43 41 4c 20 69 2c 20 64 75 6d |)...LOCAL i, dum| 0000de90 6d 79 0a 0a 09 20 20 69 20 3d 20 49 4e 53 54 52 |my... i = INSTR| 0000dea0 28 70 24 2c 20 22 2c 22 29 0a 0a 09 20 20 57 48 |(p$, ",")... WH| 0000deb0 49 4c 45 20 69 3e 30 0a 0a 09 20 20 20 20 64 75 |ILE i>0... du| 0000dec0 6d 6d 79 20 3d 20 45 56 41 4c 28 22 46 4e 5f 22 |mmy = EVAL("FN_"| 0000ded0 2b 20 4c 45 46 54 24 28 70 24 2c 20 69 2d 31 29 |+ LEFT$(p$, i-1)| 0000dee0 29 0a 0a 09 20 20 20 20 70 24 20 3d 20 4d 49 44 |)... p$ = MID| 0000def0 24 28 70 24 2c 20 69 2b 31 29 0a 0a 09 20 20 20 |$(p$, i+1)... | 0000df00 20 69 20 3d 20 49 4e 53 54 52 28 70 24 2c 20 22 | i = INSTR(p$, "| 0000df10 2c 22 29 0a 0a 09 20 20 45 4e 44 57 48 49 4c 45 |,")... ENDWHILE| 0000df20 0a 0a 09 45 4e 44 50 52 4f 43 0a 0a 63 6f 75 6c |...ENDPROC..coul| 0000df30 64 20 67 65 74 20 63 6f 64 65 64 20 61 73 3a 0a |d get coded as:.| 0000df40 0a 09 70 72 6f 63 65 64 75 72 65 20 5f 4d 75 73 |..procedure _Mus| 0000df50 69 63 28 31 29 0a 0a 09 20 20 66 75 6e 63 74 69 |ic(1)... functi| 0000df60 6f 6e 20 5f 2c 31 0a 0a 36 2e 33 2e 33 2e 33 20 |on _,1..6.3.3.3 | 0000df70 46 75 6c 6c 20 70 61 74 68 6e 61 6d 65 0a 0a 40 |Full pathname..@| 0000df80 3c 6e 3e 09 70 61 72 61 6d 65 74 65 72 20 3c 6e |<n>.parameter <n| 0000df90 3e 20 69 73 20 63 6f 6e 73 69 64 65 72 65 64 20 |> is considered | 0000dfa0 61 73 20 61 20 66 75 6c 6c 20 70 61 74 68 6e 61 |as a full pathna| 0000dfb0 6d 65 2c 20 61 6e 64 20 6a 75 73 74 20 74 68 65 |me, and just the| 0000dfc0 20 6c 65 61 66 20 6e 61 6d 65 20 69 73 20 73 75 | leaf name is su| 0000dfd0 62 73 74 69 74 75 74 65 64 2e 0a 0a 46 6f 72 20 |bstituted...For | 0000dfe0 61 6e 20 65 78 61 6d 70 6c 65 20 73 65 65 20 a7 |an example see .| 0000dff0 36 2e 33 2e 34 20 62 65 6c 6f 77 2e 0a 0a 36 2e |6.3.4 below...6.| 0000e000 33 2e 33 2e 34 20 57 69 6d 70 20 6d 65 6e 75 0a |3.3.4 Wimp menu.| 0000e010 0a bb 3c 6e 3e 09 3c 6e 3e 20 69 73 20 74 61 6b |..<n>.<n> is tak| 0000e020 65 6e 20 74 6f 20 62 65 20 61 20 57 69 6d 70 20 |en to be a Wimp | 0000e030 6d 65 6e 75 20 73 74 72 69 6e 67 2e 20 20 54 68 |menu string. Th| 0000e040 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 61 66 |is means that af| 0000e050 74 65 72 20 22 3e 22 20 61 6e 64 20 22 3a 22 20 |ter ">" and ":" | 0000e060 61 20 76 61 72 69 61 62 6c 65 20 6e 61 6d 65 20 |a variable name | 0000e070 69 73 20 65 78 70 65 63 74 65 64 2c 20 74 65 72 |is expected, ter| 0000e080 6d 69 6e 61 74 65 64 20 62 79 20 61 20 63 6f 6d |minated by a com| 0000e090 6d 61 20 6f 72 20 74 68 65 20 45 4f 53 2e 0a 0a |ma or the EOS...| 0000e0a0 49 74 20 69 73 20 61 73 73 75 6d 65 64 20 74 68 |It is assumed th| 0000e0b0 61 74 20 74 68 65 20 69 6d 70 6c 69 63 69 74 20 |at the implicit | 0000e0c0 76 61 72 69 61 62 6c 65 73 20 61 72 65 20 61 6c |variables are al| 0000e0d0 6c 20 6f 66 20 74 68 65 20 73 61 6d 65 20 74 79 |l of the same ty| 0000e0e0 70 65 2e 20 20 49 66 20 6e 6f 74 20 6a 75 73 74 |pe. If not just| 0000e0f0 20 64 65 66 69 6e 65 20 73 65 76 65 72 61 6c 20 | define several | 0000e100 72 75 6c 65 73 2c 20 6f 6e 65 20 66 6f 72 20 65 |rules, one for e| 0000e110 61 63 68 20 74 79 70 65 2e 0a 0a 46 6f 72 20 65 |ach type...For e| 0000e120 78 61 6d 70 6c 65 0a 0a 09 50 52 4f 43 5f 6d 65 |xample...PROC_me| 0000e130 6e 75 28 22 50 72 6f 67 2c 49 6e 66 6f 3e 49 6e |nu("Prog,Info>In| 0000e140 66 6f 25 2c 64 53 61 76 65 20 61 73 3e 53 61 76 |fo%,dSave as>Sav| 0000e150 65 41 73 2c 51 75 69 74 22 29 0a 0a 6d 61 79 20 |eAs,Quit")..may | 0000e160 67 65 74 20 63 6f 64 65 64 20 61 73 20 66 6f 6c |get coded as fol| 0000e170 6c 6f 77 73 3a 0a 0a 09 70 72 6f 63 65 64 75 72 |lows:...procedur| 0000e180 65 20 5f 6d 65 6e 75 28 31 29 0a 0a 09 20 20 69 |e _menu(1)... i| 0000e190 6e 74 65 67 65 72 20 bb 31 0a 0a 09 20 20 72 65 |nteger .1... re| 0000e1a0 61 6c 20 bb 31 0a 0a 36 2e 33 2e 34 20 56 61 72 |al .1..6.3.4 Var| 0000e1b0 69 61 62 6c 65 73 20 61 73 20 72 65 67 75 6c 61 |iables as regula| 0000e1c0 72 20 65 78 70 72 65 73 73 69 6f 6e 73 0a 0a 41 |r expressions..A| 0000e1d0 73 20 77 65 6c 6c 20 61 73 20 74 68 65 20 61 62 |s well as the ab| 0000e1e0 6f 76 65 20 73 70 65 63 69 61 6c 20 6d 65 74 61 |ove special meta| 0000e1f0 2d 63 68 61 72 61 63 74 65 72 73 20 42 61 73 43 |-characters BasC| 0000e200 6f 6d 70 72 65 73 73 20 77 69 6c 6c 20 6e 6f 77 |ompress will now| 0000e210 20 61 6c 6c 6f 77 20 79 6f 75 20 74 6f 20 73 70 | allow you to sp| 0000e220 65 63 69 66 79 20 73 70 65 63 69 61 6c 20 76 61 |ecify special va| 0000e230 72 69 61 62 6c 65 73 20 28 6e 6f 74 20 72 6f 75 |riables (not rou| 0000e240 74 69 6e 65 73 20 6f 72 20 6c 69 62 72 61 72 69 |tines or librari| 0000e250 65 73 29 20 61 73 20 61 20 72 65 67 75 6c 61 72 |es) as a regular| 0000e260 20 65 78 70 72 65 73 73 69 6f 6e 20 28 61 20 66 | expression (a f| 0000e270 61 6e 63 79 20 77 69 6c 64 63 61 72 64 20 65 78 |ancy wildcard ex| 0000e280 70 72 65 73 73 69 6f 6e 29 2e 20 20 54 68 69 73 |pression). This| 0000e290 20 6d 65 61 6e 73 20 74 68 61 74 20 69 6e 73 74 | means that inst| 0000e2a0 65 61 64 20 6f 66 20 73 70 65 63 69 66 79 69 6e |ead of specifyin| 0000e2b0 67 20 6f 6e 65 20 76 61 72 69 61 62 6c 65 2c 20 |g one variable, | 0000e2c0 79 6f 75 20 73 70 65 63 69 66 79 20 61 6e 79 20 |you specify any | 0000e2d0 76 61 72 69 61 62 6c 65 73 20 74 68 61 74 20 6d |variables that m| 0000e2e0 61 74 63 68 20 61 20 70 61 74 74 65 72 6e 2e 0a |atch a pattern..| 0000e2f0 0a 53 70 65 63 69 61 6c 20 76 61 72 69 61 62 6c |.Special variabl| 0000e300 65 73 20 73 6f 20 73 70 65 63 69 66 69 65 64 20 |es so specified | 0000e310 63 61 6e 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 |can not contain | 0000e320 61 6e 79 20 70 61 72 61 6d 65 74 65 72 20 73 75 |any parameter su| 0000e330 62 73 74 69 74 75 74 69 6f 6e 20 63 6f 6d 6d 61 |bstitution comma| 0000e340 6e 64 73 2e 20 20 54 68 65 79 20 61 6c 73 6f 20 |nds. They also | 0000e350 62 65 68 61 76 65 20 69 6e 20 61 20 73 6c 69 67 |behave in a slig| 0000e360 68 74 6c 79 20 64 69 66 66 65 72 65 6e 74 20 6d |htly different m| 0000e370 61 6e 6e 65 72 2e 0a 0a 54 6f 20 70 72 6f 63 65 |anner...To proce| 0000e380 73 73 20 73 70 65 63 69 61 6c 20 76 61 72 69 61 |ss special varia| 0000e390 62 6c 65 73 20 64 65 66 69 6e 65 64 20 61 73 20 |bles defined as | 0000e3a0 72 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 |regular expressi| 0000e3b0 6f 6e 73 20 42 61 73 43 6f 6d 70 72 65 73 73 20 |ons BasCompress | 0000e3c0 6d 75 73 74 20 75 73 65 20 61 20 73 65 70 61 72 |must use a separ| 0000e3d0 61 74 65 20 70 61 73 73 2c 20 62 65 74 77 65 65 |ate pass, betwee| 0000e3e0 6e 20 70 61 72 73 69 6e 67 20 61 6e 64 20 6f 75 |n parsing and ou| 0000e3f0 74 70 75 74 2e 20 20 54 68 69 73 20 73 63 61 6e |tput. This scan| 0000e400 73 20 65 76 65 72 79 20 76 61 72 69 61 62 6c 65 |s every variable| 0000e410 20 28 6f 66 20 74 68 65 20 70 61 72 74 69 63 75 | (of the particu| 0000e420 6c 61 72 20 74 79 70 65 29 20 74 6f 20 73 65 65 |lar type) to see| 0000e430 20 69 66 20 69 74 20 6d 61 74 63 68 65 73 20 74 | if it matches t| 0000e440 68 65 20 73 70 65 63 69 66 69 65 64 20 70 61 74 |he specified pat| 0000e450 74 65 72 6e 2e 20 20 49 66 20 73 6f 2c 20 74 68 |tern. If so, th| 0000e460 65 6e 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 |en the variable | 0000e470 69 73 20 66 6c 61 67 67 65 64 20 61 73 20 62 65 |is flagged as be| 0000e480 69 6e 67 20 75 6e 2d 72 65 6e 61 6d 61 62 6c 65 |ing un-renamable| 0000e490 20 99 20 61 73 20 65 78 70 65 63 74 65 64 2e 0a | . as expected..| 0000e4a0 0a 53 6f 20 77 68 61 74 20 69 73 20 61 20 72 65 |.So what is a re| 0000e4b0 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f 6e |gular expression| 0000e4c0 2c 20 61 6e 64 20 77 68 79 20 77 6f 75 6c 64 20 |, and why would | 0000e4d0 79 6f 75 20 77 61 6e 74 20 74 6f 20 75 73 65 20 |you want to use | 0000e4e0 69 74 3f 20 20 46 6f 72 20 61 20 66 75 6c 6c 20 |it? For a full | 0000e4f0 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 72 |description of r| 0000e500 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f |egular expressio| 0000e510 6e 73 20 70 6c 65 61 73 65 20 73 65 65 20 41 70 |ns please see Ap| 0000e520 70 65 6e 64 69 78 20 42 2c 20 62 75 74 20 61 6c |pendix B, but al| 0000e530 6c 20 74 68 65 20 75 73 65 66 75 6c 20 66 65 61 |l the useful fea| 0000e540 74 75 72 65 73 20 28 74 77 6f 20 6f 66 20 74 68 |tures (two of th| 0000e550 65 6d 21 29 20 77 69 6c 6c 20 62 65 20 73 68 6f |em!) will be sho| 0000e560 77 6e 20 69 6e 20 74 68 65 20 65 78 61 6d 70 6c |wn in the exampl| 0000e570 65 73 20 62 65 6c 6f 77 2e 0a 0a 59 6f 75 20 77 |es below...You w| 0000e580 6f 75 6c 64 20 77 61 6e 74 20 74 6f 20 75 73 65 |ould want to use| 0000e590 20 72 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 | regular express| 0000e5a0 69 6f 6e 73 20 74 6f 20 73 70 65 63 69 66 79 20 |ions to specify | 0000e5b0 61 20 72 61 6e 67 65 20 6f 66 20 76 61 72 69 61 |a range of varia| 0000e5c0 62 6c 65 73 20 77 69 74 68 20 74 68 65 20 73 61 |bles with the sa| 0000e5d0 6d 65 20 73 6f 72 74 20 6f 66 20 6e 61 6d 65 20 |me sort of name | 0000e5e0 99 20 69 6e 73 74 65 61 64 20 6f 66 20 73 70 65 |. instead of spe| 0000e5f0 63 69 66 79 69 6e 67 20 65 76 65 72 79 20 73 69 |cifying every si| 0000e600 6e 67 6c 65 20 6f 6e 65 20 69 6e 64 69 76 69 64 |ngle one individ| 0000e610 75 61 6c 6c 79 2e 20 20 45 67 20 73 61 79 20 79 |ually. Eg say y| 0000e620 6f 75 20 68 61 76 65 20 64 65 66 69 6e 65 64 20 |ou have defined | 0000e630 6d 61 6e 79 20 63 6f 6e 73 74 61 6e 74 73 20 73 |many constants s| 0000e640 75 63 68 20 61 73 20 27 57 69 6d 70 5f 49 6e 69 |uch as 'Wimp_Ini| 0000e650 74 69 61 6c 69 73 65 27 2c 20 27 57 69 6d 70 5f |tialise', 'Wimp_| 0000e660 43 6c 6f 73 65 44 6f 77 6e 27 2c 20 27 57 69 6d |CloseDown', 'Wim| 0000e670 70 5f 47 65 74 52 65 63 74 61 6e 67 6c 65 27 2c |p_GetRectangle',| 0000e680 20 65 74 63 2e 20 61 6e 64 20 74 68 65 6e 20 75 | etc. and then u| 0000e690 73 65 64 20 74 68 65 73 65 20 63 6f 6e 73 74 61 |sed these consta| 0000e6a0 6e 74 73 20 69 6e 20 73 6f 6d 65 20 44 41 54 41 |nts in some DATA| 0000e6b0 20 73 74 61 74 65 6d 65 6e 74 73 2e 20 20 49 6e | statements. In| 0000e6c0 73 74 65 61 64 20 6f 66 20 68 61 76 69 6e 67 20 |stead of having | 0000e6d0 61 20 28 6c 6f 6e 67 29 20 6c 69 73 74 20 6f 66 |a (long) list of| 0000e6e0 20 74 68 65 73 65 20 76 61 72 69 61 62 6c 65 20 | these variable | 0000e6f0 6e 61 6d 65 73 20 69 6e 20 74 68 65 20 73 70 65 |names in the spe| 0000e700 63 69 61 6c 20 66 69 6c 65 20 79 6f 75 20 77 6f |cial file you wo| 0000e710 75 6c 64 20 72 65 63 6f 67 6e 69 73 65 20 74 68 |uld recognise th| 0000e720 61 74 20 61 6c 6c 20 6f 66 20 74 68 65 20 76 61 |at all of the va| 0000e730 72 69 61 62 6c 65 73 20 62 65 67 69 6e 20 77 69 |riables begin wi| 0000e740 74 68 20 74 68 65 20 70 61 74 74 65 72 6e 20 27 |th the pattern '| 0000e750 57 69 6d 70 5f 27 20 61 6e 64 20 74 65 6c 6c 20 |Wimp_' and tell | 0000e760 42 61 73 43 6f 6d 70 72 65 73 73 20 74 6f 20 6d |BasCompress to m| 0000e770 61 72 6b 20 61 6c 6c 20 73 75 63 68 20 76 61 72 |ark all such var| 0000e780 69 61 62 6c 65 73 20 61 73 20 75 6e 72 65 6e 61 |iables as unrena| 0000e790 6d 61 62 6c 65 2e 0a 0a 36 2e 33 2e 34 2e 31 20 |mable...6.3.4.1 | 0000e7a0 45 78 61 6d 70 6c 65 20 70 61 74 74 65 72 6e 73 |Example patterns| 0000e7b0 0a 0a 48 65 72 65 27 73 20 68 6f 77 20 79 6f 75 |..Here's how you| 0000e7c0 20 77 6f 75 6c 64 20 77 72 69 74 65 20 74 68 65 | would write the| 0000e7d0 20 61 62 6f 76 65 20 65 78 61 6d 70 6c 65 20 69 | above example i| 0000e7e0 6e 20 61 20 73 70 65 63 69 61 6c 20 66 69 6c 65 |n a special file| 0000e7f0 3a 0a 0a 20 20 20 20 70 72 6f 63 65 64 75 72 65 |:.. procedure| 0000e800 20 64 75 6d 6d 79 28 29 0a 0a 20 20 20 20 20 20 | dummy().. | 0000e810 20 20 72 65 61 6c 20 57 69 6d 70 5f 2e 2a 0a 0a | real Wimp_.*..| 0000e820 74 68 65 20 69 6d 70 6f 72 74 61 6e 74 20 62 69 |the important bi| 0000e830 74 20 62 65 69 6e 67 20 74 68 65 20 22 2e 2a 22 |t being the ".*"| 0000e840 2e 20 20 54 68 69 73 20 73 68 6f 75 6c 64 20 62 |. This should b| 0000e850 65 20 72 65 61 64 20 61 73 20 22 61 6e 79 20 63 |e read as "any c| 0000e860 68 61 72 61 63 74 65 72 22 2c 20 22 72 65 70 65 |haracter", "repe| 0000e870 61 74 65 64 20 30 20 6f 72 20 6d 6f 72 65 20 74 |ated 0 or more t| 0000e880 69 6d 65 73 22 2e 20 20 49 65 20 61 73 20 6c 6f |imes". Ie as lo| 0000e890 6e 67 20 61 73 20 61 20 76 61 72 69 61 62 6c 65 |ng as a variable| 0000e8a0 20 73 74 61 72 74 73 20 77 69 74 68 20 74 68 65 | starts with the| 0000e8b0 20 66 69 76 65 20 63 68 61 72 61 63 74 65 72 73 | five characters| 0000e8c0 20 22 57 69 6d 70 5f 22 20 74 68 65 20 70 61 74 | "Wimp_" the pat| 0000e8d0 74 65 72 6e 20 69 73 20 6d 61 74 63 68 65 64 2e |tern is matched.| 0000e8e0 0a 0a 41 6e 6f 74 68 65 72 20 66 72 65 71 75 65 |..Another freque| 0000e8f0 6e 74 20 63 61 73 65 20 69 73 20 77 68 65 6e 20 |nt case is when | 0000e900 76 61 72 69 61 62 6c 65 73 20 68 61 76 65 20 74 |variables have t| 0000e910 68 65 20 73 61 6d 65 20 70 6f 73 74 66 69 78 20 |he same postfix | 0000e920 2d 20 65 67 20 74 68 65 20 70 61 74 74 65 72 6e |- eg the pattern| 0000e930 3a 0a 0a 09 69 6e 74 65 67 65 72 20 2e 2a 43 4d |:...integer .*CM| 0000e940 4f 53 5c 3e 0a 0a 77 6f 75 6c 64 20 6d 61 74 63 |OS\>..would matc| 0000e950 68 20 61 6c 6c 20 69 6e 74 65 67 65 72 73 20 74 |h all integers t| 0000e960 68 61 74 20 65 6e 64 20 28 22 5c 3e 22 20 6d 65 |hat end ("\>" me| 0000e970 61 6e 73 20 22 6d 61 74 63 68 20 65 6e 64 20 6f |ans "match end o| 0000e980 66 20 76 61 72 69 61 62 6c 65 22 29 20 69 6e 20 |f variable") in | 0000e990 74 68 65 20 6c 65 74 74 65 72 73 20 43 4d 4f 53 |the letters CMOS| 0000e9a0 2c 20 69 65 20 4d 6f 73 52 4f 4d 46 72 75 67 61 |, ie MosROMFruga| 0000e9b0 6c 43 4d 4f 53 25 2c 20 46 6f 6e 74 4d 61 78 43 |lCMOS%, FontMaxC| 0000e9c0 4d 4f 53 25 2c 20 65 74 63 2e 2e 2e 20 20 54 68 |MOS%, etc... Th| 0000e9d0 65 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 20 |e specification | 0000e9e0 74 68 61 74 20 43 4d 4f 53 20 62 65 20 61 74 20 |that CMOS be at | 0000e9f0 74 68 65 20 65 6e 64 20 73 74 6f 70 73 2c 20 73 |the end stops, s| 0000ea00 61 79 2c 20 4d 79 43 4d 4f 53 76 61 72 25 20 62 |ay, MyCMOSvar% b| 0000ea10 65 69 6e 67 20 6d 61 74 63 68 65 64 20 62 79 20 |eing matched by | 0000ea20 74 68 65 20 70 61 74 74 65 72 6e 2c 20 61 73 20 |the pattern, as | 0000ea30 69 74 20 6f 74 68 65 72 77 69 73 65 20 77 6f 75 |it otherwise wou| 0000ea40 6c 64 20 69 66 20 74 68 69 73 20 77 65 72 65 20 |ld if this were | 0000ea50 6e 6f 74 20 69 6e 63 6c 75 64 65 64 2e 0a 0a 36 |not included...6| 0000ea60 2e 33 2e 34 2e 32 20 4c 69 6d 69 74 61 74 69 6f |.3.4.2 Limitatio| 0000ea70 6e 73 0a 0a 41 6c 74 68 6f 75 67 68 20 61 20 72 |ns..Although a r| 0000ea80 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f |egular expressio| 0000ea90 6e 20 6d 61 79 20 62 65 20 64 65 66 69 6e 65 64 |n may be defined| 0000eaa0 20 64 65 70 65 6e 64 65 6e 74 20 6f 6e 20 61 20 | dependent on a | 0000eab0 73 70 65 63 69 61 6c 20 72 6f 75 74 69 6e 65 20 |special routine | 0000eac0 62 65 69 6e 67 20 63 61 6c 6c 65 64 2c 20 74 68 |being called, th| 0000ead0 69 73 20 66 61 63 74 20 69 73 20 63 75 72 72 65 |is fact is curre| 0000eae0 6e 74 6c 79 20 69 67 6e 6f 72 65 64 20 99 20 61 |ntly ignored . a| 0000eaf0 6c 6c 20 73 70 65 63 69 61 6c 20 76 61 72 69 61 |ll special varia| 0000eb00 62 6c 65 73 20 73 70 65 63 69 66 69 65 64 20 75 |bles specified u| 0000eb10 73 69 6e 67 20 61 20 72 65 67 75 6c 61 72 20 65 |sing a regular e| 0000eb20 78 70 72 65 73 73 69 6f 6e 20 61 72 65 20 75 73 |xpression are us| 0000eb30 65 64 20 64 75 72 69 6e 67 20 74 68 65 20 70 61 |ed during the pa| 0000eb40 73 73 2e 20 20 46 6f 72 20 74 68 69 73 20 72 65 |ss. For this re| 0000eb50 61 73 6f 6e 20 69 74 20 69 73 20 70 72 6f 62 61 |ason it is proba| 0000eb60 62 6c 79 20 77 6f 72 74 68 77 68 69 6c 65 20 74 |bly worthwhile t| 0000eb70 6f 20 70 6c 61 63 65 20 61 6c 6c 20 77 69 6c 64 |o place all wild| 0000eb80 2d 63 61 72 64 20 73 70 65 63 69 66 69 63 61 74 |-card specificat| 0000eb90 69 6f 6e 73 20 61 73 20 67 6c 6f 62 61 6c 20 99 |ions as global .| 0000eba0 20 69 65 20 69 6e 20 74 68 65 20 6d 61 69 6e 20 | ie in the main | 0000ebb0 70 72 6f 67 72 61 6d 20 73 65 63 74 69 6f 6e 20 |program section | 0000ebc0 6f 66 20 74 68 65 20 73 70 65 63 69 61 6c 20 66 |of the special f| 0000ebd0 69 6c 65 2e 20 20 54 68 69 73 20 6c 69 6d 69 74 |ile. This limit| 0000ebe0 61 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 6c |ation will not l| 0000ebf0 61 73 74 20 6c 6f 6e 67 2e 0a 0a 43 75 72 72 65 |ast long...Curre| 0000ec00 6e 74 6c 79 20 61 20 76 61 72 69 61 62 6c 65 20 |ntly a variable | 0000ec10 74 68 61 74 20 69 73 20 72 65 63 6f 67 6e 69 73 |that is recognis| 0000ec20 65 64 20 61 73 20 6d 61 74 63 68 69 6e 67 20 61 |ed as matching a| 0000ec30 20 70 61 74 74 65 72 6e 20 69 73 20 66 6c 61 67 | pattern is flag| 0000ec40 67 65 64 20 61 73 20 62 65 69 6e 67 20 72 65 66 |ged as being ref| 0000ec50 65 72 65 6e 63 65 64 20 66 72 6f 6d 20 74 68 65 |erenced from the| 0000ec60 20 6d 61 69 6e 20 70 72 6f 67 72 61 6d 20 28 69 | main program (i| 0000ec70 6e 20 74 68 65 20 63 72 6f 73 73 20 72 65 66 65 |n the cross refe| 0000ec80 72 65 6e 63 65 29 20 61 6e 64 20 6e 6f 74 20 69 |rence) and not i| 0000ec90 6e 73 69 64 65 20 74 68 65 20 73 70 65 63 69 61 |nside the specia| 0000eca0 6c 20 72 6f 75 74 69 6e 65 20 74 68 61 74 20 73 |l routine that s| 0000ecb0 70 65 63 69 66 69 65 64 20 74 68 65 20 77 69 6c |pecified the wil| 0000ecc0 64 63 61 72 64 20 99 20 62 75 74 20 74 68 69 73 |dcard . but this| 0000ecd0 20 77 69 6c 6c 20 63 68 61 6e 67 65 20 69 6e 20 | will change in | 0000ece0 61 20 6c 61 74 65 72 20 76 65 72 73 69 6f 6e 2e |a later version.| 0000ecf0 0a 0a 36 2e 33 2e 35 20 4c 69 62 72 61 72 69 65 |..6.3.5 Librarie| 0000ed00 73 0a 0a 41 73 20 77 65 6c 6c 20 61 73 20 6c 61 |s..As well as la| 0000ed10 62 65 6c 73 2c 20 6c 69 62 72 61 72 69 65 73 20 |bels, libraries | 0000ed20 6d 61 79 20 62 65 20 69 6d 70 6c 69 63 69 74 2e |may be implicit.| 0000ed30 20 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 68 | For example, h| 0000ed40 65 72 65 27 73 20 61 20 73 69 6d 70 6c 65 20 6c |ere's a simple l| 0000ed50 69 62 72 61 72 79 20 68 61 6e 64 6c 65 72 3a 0a |ibrary handler:.| 0000ed60 0a 09 50 52 4f 43 5f 4c 6f 61 64 5f 4c 69 62 72 |..PROC_Load_Libr| 0000ed70 61 72 79 28 22 3c 42 61 73 69 63 24 4c 69 62 3e |ary("<Basic$Lib>| 0000ed80 2e 57 69 6d 70 22 2c 20 32 29 0a 0a 09 2e 2e 2e |.Wimp", 2)......| 0000ed90 0a 0a 09 3a 0a 0a 09 44 45 46 20 50 52 4f 43 5f |...:...DEF PROC_| 0000eda0 4c 6f 61 64 5f 4c 69 62 72 61 72 79 28 66 24 2c |Load_Library(f$,| 0000edb0 20 76 29 0a 0a 09 4c 4f 43 41 4c 20 78 0a 0a 09 | v)...LOCAL x...| 0000edc0 20 20 4c 49 42 52 41 52 59 20 66 69 6c 65 24 0a | LIBRARY file$.| 0000edd0 0a 09 20 20 78 20 3d 20 45 56 41 4c 28 22 46 4e |.. x = EVAL("FN| 0000ede0 5f 49 6e 69 74 5f 22 2b 20 46 4e 6c 65 61 66 28 |_Init_"+ FNleaf(| 0000edf0 66 24 29 29 0a 0a 09 20 20 49 46 20 45 56 41 4c |f$))... IF EVAL| 0000ee00 28 22 56 65 72 73 69 6f 6e 5f 22 2b 20 46 4e 6c |("Version_"+ FNl| 0000ee10 65 61 66 28 66 24 29 29 3c 76 20 54 48 45 4e 0a |eaf(f$))<v THEN.| 0000ee20 0a 09 20 20 20 20 45 52 52 4f 52 20 31 2c 20 22 |.. ERROR 1, "| 0000ee30 4c 69 62 72 61 72 79 20 74 6f 6f 20 6f 6c 64 22 |Library too old"| 0000ee40 0a 0a 09 20 20 45 4e 44 49 46 0a 0a 09 45 4e 44 |... ENDIF...END| 0000ee50 50 52 4f 43 0a 0a 57 65 6c 6c 2c 20 69 6e 20 72 |PROC..Well, in r| 0000ee60 65 61 6c 20 6c 69 66 65 20 79 6f 75 27 64 20 73 |eal life you'd s| 0000ee70 65 74 20 75 70 20 65 72 72 6f 72 20 68 61 6e 64 |et up error hand| 0000ee80 6c 65 72 73 20 61 6e 64 20 6e 6f 74 65 20 77 68 |lers and note wh| 0000ee90 69 63 68 20 6c 69 62 72 61 72 69 65 73 20 68 61 |ich libraries ha| 0000eea0 76 65 20 61 6c 72 65 61 64 79 20 62 65 65 6e 20 |ve already been | 0000eeb0 6c 6f 61 64 65 64 2c 20 62 75 74 20 79 6f 75 20 |loaded, but you | 0000eec0 67 65 74 20 74 68 65 20 69 64 65 61 2e 20 20 54 |get the idea. T| 0000eed0 68 69 73 20 63 6f 75 6c 64 20 62 65 20 63 6f 64 |his could be cod| 0000eee0 65 64 20 61 73 20 66 6f 6c 6c 6f 77 73 3a 0a 0a |ed as follows:..| 0000eef0 09 70 72 6f 63 65 64 75 72 65 20 5f 4c 6f 61 64 |.procedure _Load| 0000ef00 5f 4c 69 62 72 61 72 79 28 31 2c 29 0a 0a 09 20 |_Library(1,)... | 0000ef10 20 6c 69 62 72 61 72 79 20 5c 31 0a 0a 09 20 20 | library \1... | 0000ef20 66 75 6e 63 74 69 6f 6e 20 5f 49 6e 69 74 5f 40 |function _Init_@| 0000ef30 31 0a 0a 09 20 20 72 65 61 6c 20 56 65 72 73 69 |1... real Versi| 0000ef40 6f 6e 5f 40 31 0a 0a 4e 6f 74 65 20 74 68 65 20 |on_@1..Note the | 0000ef50 75 73 65 20 6f 66 20 40 3c 6e 3e 20 74 6f 20 65 |use of @<n> to e| 0000ef60 78 74 72 61 63 74 20 74 68 65 20 6c 65 61 66 20 |xtract the leaf | 0000ef70 6e 61 6d 65 2e 0a 0a 49 6e 20 74 68 65 20 6f 75 |name...In the ou| 0000ef80 74 70 75 74 20 70 72 6f 67 72 61 6d 20 74 68 65 |tput program the| 0000ef90 20 65 6e 74 69 72 65 20 73 74 61 74 65 6d 65 6e | entire statemen| 0000efa0 74 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 |t containing the| 0000efb0 20 4c 49 42 52 41 52 59 20 69 73 20 72 65 6d 6f | LIBRARY is remo| 0000efc0 76 65 64 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 |ved...Note that | 0000efd0 62 65 63 61 75 73 65 20 42 61 73 43 6f 6d 70 72 |because BasCompr| 0000efe0 65 73 73 20 61 6e 61 6c 79 73 65 73 20 74 68 65 |ess analyses the| 0000eff0 20 70 72 6f 67 72 61 6d 20 69 6e 20 61 20 6c 69 | program in a li| 0000f000 6e 65 61 72 20 66 61 73 68 69 6f 6e 2c 20 74 68 |near fashion, th| 0000f010 65 20 6f 72 64 65 72 20 6f 66 20 6c 69 62 72 61 |e order of libra| 0000f020 72 79 20 72 6f 75 74 69 6e 65 73 20 6d 61 79 20 |ry routines may | 0000f030 77 65 6c 6c 20 62 65 20 64 69 66 66 65 72 65 6e |well be differen| 0000f040 74 20 66 72 6f 6d 20 74 68 61 74 20 75 73 65 64 |t from that used| 0000f050 20 69 6e 20 74 68 65 20 75 6e 63 6f 6d 70 72 65 | in the uncompre| 0000f060 73 73 65 64 20 70 72 6f 67 72 61 6d 2c 20 28 73 |ssed program, (s| 0000f070 65 65 20 a7 32 2e 31 30 29 2e 0a 0a 36 2e 33 2e |ee .2.10)...6.3.| 0000f080 36 20 49 6e 63 6c 75 64 65 20 66 69 6c 65 73 0a |6 Include files.| 0000f090 0a 49 74 20 69 73 20 70 6f 73 73 69 62 6c 65 20 |.It is possible | 0000f0a0 66 6f 72 20 73 70 65 63 69 61 6c 20 66 69 6c 65 |for special file| 0000f0b0 73 20 74 6f 20 69 6e 63 6c 75 64 65 20 6f 74 68 |s to include oth| 0000f0c0 65 72 20 73 70 65 63 69 61 6c 20 66 69 6c 65 73 |er special files| 0000f0d0 2e 20 20 54 68 75 73 20 79 6f 75 20 77 69 6c 6c |. Thus you will| 0000f0e0 20 70 72 6f 62 61 62 6c 79 20 73 65 74 20 75 70 | probably set up| 0000f0f0 20 42 61 73 43 6f 6d 70 72 65 73 73 24 50 61 74 | BasCompress$Pat| 0000f100 68 20 61 6e 64 20 61 20 73 70 65 63 69 61 6c 20 |h and a special | 0000f110 66 69 6c 65 20 74 6f 20 68 61 6e 64 6c 65 20 79 |file to handle y| 0000f120 6f 75 72 20 6f 77 6e 20 73 65 74 20 6f 66 20 73 |our own set of s| 0000f130 74 61 6e 64 61 72 64 20 6c 69 62 72 61 72 69 65 |tandard librarie| 0000f140 73 2c 20 61 6e 64 20 74 68 65 6e 2e 2e 2e 0a 0a |s, and then.....| 0000f150 09 23 69 6e 63 6c 75 64 65 20 6d 79 6c 69 62 73 |.#include mylibs| 0000f160 0a 0a 73 6f 6d 65 77 68 65 72 65 20 69 6e 20 74 |..somewhere in t| 0000f170 68 65 20 73 70 65 63 69 61 6c 20 66 69 6c 65 20 |he special file | 0000f180 66 6f 72 20 65 61 63 68 20 70 61 72 74 69 63 75 |for each particu| 0000f190 6c 61 72 20 70 72 6f 67 72 61 6d 2e 20 20 28 4e |lar program. (N| 0000f1a0 6f 74 65 20 74 68 61 74 20 74 68 65 72 65 20 61 |ote that there a| 0000f1b0 72 65 20 6e 6f 20 73 70 61 63 65 73 20 74 6f 20 |re no spaces to | 0000f1c0 74 68 65 20 6c 65 66 74 20 6f 66 20 74 68 65 20 |the left of the | 0000f1d0 23 69 6e 63 6c 75 64 65 2c 20 61 6e 64 20 64 6f |#include, and do| 0000f1e0 6e 27 74 20 70 75 74 20 61 6e 79 20 71 75 6f 74 |n't put any quot| 0000f1f0 65 73 20 6f 6e 20 74 68 65 20 6e 61 6d 65 20 65 |es on the name e| 0000f200 69 74 68 65 72 29 2e 0a 0a 4e 65 73 74 69 6e 67 |ither)...Nesting| 0000f210 20 6c 65 76 65 6c 20 69 73 20 6e 6f 74 20 6c 69 | level is not li| 0000f220 6d 69 74 65 64 2c 20 61 6e 64 20 79 6f 75 20 63 |mited, and you c| 0000f230 61 6e 20 72 65 63 75 72 73 65 2e 20 20 54 68 69 |an recurse. Thi| 0000f240 73 20 77 69 6c 6c 20 72 65 73 75 6c 74 20 69 6e |s will result in| 0000f250 20 61 6e 20 69 6e 66 69 6e 69 74 65 20 6c 6f 6f | an infinite loo| 0000f260 70 2c 20 77 69 74 68 20 74 68 65 20 6f 6e 6c 79 |p, with the only| 0000f270 20 72 65 73 6f 72 74 20 62 65 69 6e 67 20 74 6f | resort being to| 0000f280 20 70 72 65 73 73 20 65 73 63 61 70 65 20 74 6f | press escape to| 0000f290 20 71 75 69 74 2c 20 61 6e 64 20 74 68 65 6e 20 | quit, and then | 0000f2a0 65 78 61 6d 69 6e 65 20 74 68 65 20 6c 6f 67 20 |examine the log | 0000f2b0 66 69 6c 65 2e 0a 0a 36 2e 34 20 4c 69 6d 69 74 |file...6.4 Limit| 0000f2c0 61 74 69 6f 6e 73 0a 0a 54 68 65 72 65 20 63 61 |ations..There ca| 0000f2d0 6e 20 6f 6e 6c 79 20 62 65 20 32 35 30 20 6f 64 |n only be 250 od| 0000f2e0 64 20 74 6f 74 61 6c 20 53 70 65 63 69 61 6c 20 |d total Special | 0000f2f0 72 6f 75 74 69 6e 65 73 20 64 65 66 69 6e 65 64 |routines defined| 0000f300 2e 20 20 49 66 20 61 6e 79 20 6f 6e 65 20 61 63 |. If any one ac| 0000f310 74 75 61 6c 6c 79 20 72 65 61 63 68 65 73 20 74 |tually reaches t| 0000f320 68 69 73 20 6c 69 6d 69 74 2c 20 74 68 65 6e 20 |his limit, then | 0000f330 63 6f 6e 74 61 63 74 20 74 68 65 20 61 75 74 68 |contact the auth| 0000f340 6f 72 2c 20 69 74 27 73 20 65 61 73 79 20 74 6f |or, it's easy to| 0000f350 20 61 6c 74 65 72 20 2d 20 61 74 20 74 68 65 20 | alter - at the | 0000f360 65 78 70 65 6e 73 65 20 6f 66 20 61 20 73 6c 69 |expense of a sli| 0000f370 67 68 74 20 69 6e 63 72 65 61 73 65 20 69 6e 20 |ght increase in | 0000f380 6d 65 6d 6f 72 79 20 75 73 61 67 65 2e 0a 0a 54 |memory usage...T| 0000f390 68 65 72 65 20 69 73 20 6f 66 20 63 6f 75 72 73 |here is of cours| 0000f3a0 65 20 6f 6e 65 20 6d 61 6a 6f 72 20 6c 69 6d 69 |e one major limi| 0000f3b0 74 61 74 69 6f 6e 20 69 6e 20 74 68 61 74 20 79 |tation in that y| 0000f3c0 6f 75 20 68 61 76 65 20 74 6f 20 73 70 65 63 69 |ou have to speci| 0000f3d0 66 79 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 61 |fy the name of a| 0000f3e0 6c 6c 20 74 68 65 20 73 70 65 63 69 61 6c 20 66 |ll the special f| 0000f3f0 69 6c 65 73 20 62 65 66 6f 72 65 20 70 72 6f 63 |iles before proc| 0000f400 65 73 73 69 6e 67 20 74 68 65 20 70 72 6f 67 72 |essing the progr| 0000f410 61 6d 2e 20 20 49 74 20 77 6f 75 6c 64 20 62 65 |am. It would be| 0000f420 20 6e 69 63 65 20 74 6f 20 73 65 74 20 75 70 20 | nice to set up | 0000f430 61 20 73 79 73 74 65 6d 20 77 68 65 72 65 62 79 |a system whereby| 0000f440 20 69 66 20 74 68 65 20 70 72 6f 67 72 61 6d 20 | if the program | 0000f450 28 6d 61 79 62 65 20 69 6d 70 6c 69 63 69 74 6c |(maybe implicitl| 0000f460 79 29 20 6c 6f 61 64 73 20 69 6e 20 6c 69 62 72 |y) loads in libr| 0000f470 61 72 79 20 58 2c 20 74 68 65 6e 20 6c 6f 61 64 |ary X, then load| 0000f480 20 75 70 20 73 70 65 63 69 61 6c 20 66 69 6c 65 | up special file| 0000f490 20 59 2e 20 20 48 6f 77 65 76 65 72 20 74 68 69 | Y. However thi| 0000f4a0 73 20 77 6f 75 6c 64 20 72 65 71 75 69 72 65 20 |s would require | 0000f4b0 72 65 2d 66 69 6e 64 69 6e 67 20 61 6c 6c 20 63 |re-finding all c| 0000f4c0 61 6c 6c 73 20 74 6f 20 74 68 65 20 28 6e 65 77 |alls to the (new| 0000f4d0 29 20 53 70 65 63 69 61 6c 20 72 6f 75 74 69 6e |) Special routin| 0000f4e0 65 73 20 2d 20 73 6f 6d 65 74 68 69 6e 67 20 74 |es - something t| 0000f4f0 68 61 74 20 73 65 65 6d 73 20 71 75 69 74 65 20 |hat seems quite | 0000f500 68 61 72 64 20 74 6f 20 64 6f 20 3a 2d 28 0a 0a |hard to do :-(..| 0000f510 46 69 6e 61 6c 6c 79 2c 20 79 6f 75 27 64 20 6c |Finally, you'd l| 0000f520 69 6b 65 20 74 6f 20 62 65 20 61 62 6c 65 20 74 |ike to be able t| 0000f530 6f 20 74 61 6b 65 20 69 6e 74 6f 20 61 63 63 6f |o take into acco| 0000f540 75 6e 74 20 74 68 65 20 73 63 6f 70 65 20 6f 66 |unt the scope of| 0000f550 20 74 68 65 20 76 61 72 69 61 62 6c 65 73 20 73 | the variables s| 0000f560 6f 20 6f 6e 6c 79 20 74 68 65 20 75 73 65 20 6f |o only the use o| 0000f570 66 20 76 61 72 69 61 62 6c 65 73 20 69 6e 20 73 |f variables in s| 0000f580 63 6f 70 65 20 61 72 65 20 6e 6f 74 20 72 65 64 |cope are not red| 0000f590 75 63 65 64 2e 20 20 42 75 74 20 73 69 6e 63 65 |uced. But since| 0000f5a0 20 42 61 73 69 63 56 20 6f 6e 6c 79 20 68 61 73 | BasicV only has| 0000f5b0 20 6f 6e 65 20 73 63 6f 70 65 2c 20 74 68 69 73 | one scope, this| 0000f5c0 20 69 73 20 6e 6f 74 20 70 6f 73 73 69 62 6c 65 | is not possible| 0000f5d0 20 74 6f 20 69 6d 70 6c 65 6d 65 6e 74 20 73 61 | to implement sa| 0000f5e0 66 65 6c 79 2c 20 77 69 74 68 6f 75 74 20 73 6f |fely, without so| 0000f5f0 6d 65 20 65 78 70 6c 69 63 69 74 20 68 65 6c 70 |me explicit help| 0000f600 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 67 72 61 | from the progra| 0000f610 6d 6d 65 72 20 62 79 20 6d 61 72 6b 69 6e 67 20 |mmer by marking | 0000f620 74 68 65 20 73 63 6f 70 65 20 6f 66 20 76 61 72 |the scope of var| 0000f630 69 61 62 6c 65 73 20 69 6e 20 73 6f 6d 65 20 77 |iables in some w| 0000f640 61 79 2e 0a 0a 0c 0a 0a 37 20 45 72 72 6f 72 73 |ay......7 Errors| 0000f650 0a 0a 37 2e 31 20 4f 76 65 72 76 69 65 77 0a 0a |..7.1 Overview..| 0000f660 45 72 72 6f 72 73 20 61 6e 64 20 77 61 72 6e 69 |Errors and warni| 0000f670 6e 67 73 20 63 61 6e 20 62 65 20 67 65 6e 65 72 |ngs can be gener| 0000f680 61 74 65 64 20 61 74 20 76 61 72 69 6f 75 73 20 |ated at various | 0000f690 73 74 61 67 65 73 20 6f 66 20 74 68 65 20 67 61 |stages of the ga| 0000f6a0 6d 65 2e 20 20 54 68 65 79 20 61 6c 6c 20 6c 6f |me. They all lo| 0000f6b0 6f 6b 20 74 68 65 20 73 61 6d 65 20 61 6e 64 20 |ok the same and | 0000f6c0 61 72 65 20 61 6c 6c 20 73 65 6e 74 20 74 6f 20 |are all sent to | 0000f6d0 74 68 65 20 63 75 72 72 65 6e 74 20 6c 6f 67 20 |the current log | 0000f6e0 28 66 69 6c 65 20 2f 20 73 63 72 65 65 6e 29 2e |(file / screen).| 0000f6f0 20 20 54 68 65 20 66 6f 72 6d 61 74 20 69 73 3a | The format is:| 0000f700 0a 0a 09 66 69 6c 65 20 31 32 33 34 20 77 61 72 |...file 1234 war| 0000f710 6e 69 6e 67 20 33 3a 20 6d 65 73 73 61 67 65 0a |ning 3: message.| 0000f720 0a 49 66 20 74 68 65 72 65 20 69 73 20 6e 6f 20 |.If there is no | 0000f730 66 69 6c 65 6e 61 6d 65 2c 20 74 68 65 6e 20 69 |filename, then i| 0000f740 74 20 69 6e 64 69 63 61 74 65 73 20 74 68 65 20 |t indicates the | 0000f750 65 72 72 6f 72 20 69 73 20 67 6c 6f 62 61 6c 20 |error is global | 0000f760 20 69 6e 20 73 63 6f 70 65 2c 20 66 6f 72 20 65 | in scope, for e| 0000f770 78 61 6d 70 6c 65 20 74 68 65 20 94 75 6e 64 65 |xample the .unde| 0000f780 66 69 6e 65 64 20 72 6f 75 74 69 6e 65 95 20 65 |fined routine. e| 0000f790 72 72 6f 72 20 67 65 6e 65 72 61 74 65 64 20 77 |rror generated w| 0000f7a0 68 65 6e 20 61 6c 6c 20 66 69 6c 65 73 20 68 61 |hen all files ha| 0000f7b0 76 65 20 62 65 65 6e 20 70 61 72 73 65 64 2e 0a |ve been parsed..| 0000f7c0 0a 57 61 72 6e 69 6e 67 73 20 72 65 70 6f 72 74 |.Warnings report| 0000f7d0 20 6e 6f 6e 2d 66 61 74 61 6c 20 64 65 66 69 63 | non-fatal defic| 0000f7e0 69 65 6e 63 69 65 73 2e 20 20 45 72 72 6f 72 73 |iencies. Errors| 0000f7f0 20 72 65 70 6f 72 74 20 61 20 6d 61 6a 6f 72 20 | report a major | 0000f800 70 72 6f 62 6c 65 6d 2c 20 61 6e 64 20 77 69 6c |problem, and wil| 0000f810 6c 20 73 74 6f 70 20 61 6e 79 20 6f 75 74 70 75 |l stop any outpu| 0000f820 74 20 66 69 6c 65 20 62 65 69 6e 67 20 67 65 6e |t file being gen| 0000f830 65 72 61 74 65 64 2e 0a 0a 41 73 20 77 69 74 68 |erated...As with| 0000f840 20 61 6c 6c 20 74 65 78 74 20 75 73 65 64 20 62 | all text used b| 0000f850 79 20 42 61 73 43 6f 6d 70 72 65 73 73 2c 20 74 |y BasCompress, t| 0000f860 68 65 73 65 20 65 72 72 6f 72 20 74 65 78 74 73 |hese error texts| 0000f870 20 61 72 65 20 68 65 6c 64 20 69 6e 20 74 68 65 | are held in the| 0000f880 20 4d 65 73 73 61 67 65 73 20 66 69 6c 65 2e 0a | Messages file..| 0000f890 0a 49 74 20 69 73 20 77 6f 72 74 68 20 70 6f 69 |.It is worth poi| 0000f8a0 6e 74 69 6e 67 20 6f 75 74 20 74 68 61 74 20 6d |nting out that m| 0000f8b0 61 6e 79 20 77 61 72 6e 69 6e 67 73 20 61 6e 64 |any warnings and| 0000f8c0 20 65 72 72 6f 72 73 20 6d 61 79 20 62 65 20 67 | errors may be g| 0000f8d0 65 6e 65 72 61 74 65 64 20 61 66 74 65 72 20 74 |enerated after t| 0000f8e0 68 65 20 73 65 65 6d 69 6e 67 6c 79 20 69 6e 6e |he seemingly inn| 0000f8f0 6f 63 65 6e 74 20 77 61 72 6e 69 6e 67 73 20 39 |ocent warnings 9| 0000f900 20 61 6e 64 20 31 30 2e 20 20 54 68 69 73 20 6d | and 10. This m| 0000f910 65 61 6e 73 20 74 68 61 74 20 42 61 73 43 6f 6d |eans that BasCom| 0000f920 70 72 65 73 73 20 6d 61 79 20 68 61 76 65 20 6c |press may have l| 0000f930 6f 73 74 20 74 6f 75 63 68 20 77 69 74 68 20 77 |ost touch with w| 0000f940 68 61 74 20 72 6f 75 74 69 6e 65 20 69 73 20 62 |hat routine is b| 0000f950 65 69 6e 67 20 64 65 66 69 6e 65 64 2c 20 61 6e |eing defined, an| 0000f960 64 20 73 74 61 72 74 73 20 69 6e 74 65 72 70 72 |d starts interpr| 0000f970 65 74 69 6e 67 20 74 68 65 20 6a 75 6e 6b 20 69 |eting the junk i| 0000f980 6e 62 65 74 77 65 65 6e 20 72 6f 75 74 69 6e 65 |nbetween routine| 0000f990 73 20 61 73 20 67 65 6e 75 69 6e 65 20 63 6f 64 |s as genuine cod| 0000f9a0 65 2e 20 20 53 6f 20 64 6f 20 63 68 65 63 6b 20 |e. So do check | 0000f9b0 74 68 65 20 6c 6f 67 20 66 69 6c 65 20 66 72 6f |the log file fro| 0000f9c0 6d 20 74 68 65 20 73 74 61 72 74 2e 0a 0a 37 2e |m the start...7.| 0000f9d0 32 20 57 61 72 6e 69 6e 67 73 0a 0a 4d 6f 73 74 |2 Warnings..Most| 0000f9e0 20 6f 66 20 74 68 65 20 77 61 72 6e 69 6e 67 73 | of the warnings| 0000f9f0 20 61 72 65 20 73 65 6c 66 20 65 78 70 6c 61 6e | are self explan| 0000fa00 61 74 6f 72 79 2e 0a 0a 0a 0a 09 31 09 45 78 70 |atory......1.Exp| 0000fa10 65 63 74 69 6e 67 20 50 52 4f 43 20 6f 72 20 46 |ecting PROC or F| 0000fa20 4e 20 61 66 74 65 72 20 44 45 46 0a 0a 49 6e 20 |N after DEF..In | 0000fa30 73 74 61 6e 64 61 72 64 20 42 61 73 69 63 2c 20 |standard Basic, | 0000fa40 74 68 65 73 65 20 61 72 65 20 74 68 65 20 6f 6e |these are the on| 0000fa50 6c 79 20 76 61 6c 69 64 20 74 68 69 6e 67 73 20 |ly valid things | 0000fa60 61 66 74 65 72 20 61 20 44 45 46 2e 20 20 54 68 |after a DEF. Th| 0000fa70 69 73 20 77 61 72 6e 69 6e 67 20 68 61 73 20 6e |is warning has n| 0000fa80 65 76 65 72 20 62 65 65 6e 20 65 6e 63 6f 75 6e |ever been encoun| 0000fa90 74 65 72 65 64 20 69 6e 20 64 65 62 75 67 67 65 |tered in debugge| 0000faa0 64 20 73 6f 75 72 63 65 21 0a 0a 0a 0a 09 32 09 |d source!.....2.| 0000fab0 44 45 46 20 69 6e 73 69 64 65 20 61 20 72 6f 75 |DEF inside a rou| 0000fac0 74 69 6e 65 0a 0a 54 68 69 73 20 69 73 20 67 65 |tine..This is ge| 0000fad0 6e 65 72 61 74 65 64 20 62 65 63 61 75 73 65 20 |nerated because | 0000fae0 61 6e 20 65 61 72 6c 69 65 72 20 72 6f 75 74 69 |an earlier routi| 0000faf0 6e 65 20 64 69 64 20 6e 6f 74 20 65 78 69 74 20 |ne did not exit | 0000fb00 63 6c 65 61 6e 6c 79 2c 20 61 6e 64 20 74 68 65 |cleanly, and the| 0000fb10 20 70 72 6f 67 72 61 6d 20 62 65 6c 69 65 76 65 | program believe| 0000fb20 73 20 79 6f 75 20 61 72 65 20 73 74 69 6c 6c 20 |s you are still | 0000fb30 69 6e 20 74 68 69 73 20 72 6f 75 74 69 6e 65 2e |in this routine.| 0000fb40 20 20 59 6f 75 20 6e 65 65 64 20 74 6f 20 66 69 | You need to fi| 0000fb50 78 20 74 68 65 20 65 72 72 61 6e 74 20 72 6f 75 |x the errant rou| 0000fb60 74 69 6e 65 20 62 79 20 74 65 72 6d 69 6e 61 74 |tine by terminat| 0000fb70 69 6e 67 20 69 74 20 70 72 6f 70 65 72 6c 79 2c |ing it properly,| 0000fb80 20 6f 72 20 73 69 6d 70 6c 79 20 61 70 70 65 6e | or simply appen| 0000fb90 64 69 6e 67 20 61 20 64 75 6d 6d 79 20 72 6f 75 |ding a dummy rou| 0000fba0 74 69 6e 65 20 65 6e 64 20 28 45 4e 44 50 52 4f |tine end (ENDPRO| 0000fbb0 43 20 6f 72 20 3d a0 3c 65 78 70 72 3e 29 2e 0a |C or =.<expr>)..| 0000fbc0 0a 0a 0a 09 33 09 55 6e 65 78 70 65 63 74 65 64 |....3.Unexpected| 0000fbd0 20 70 65 72 69 6f 64 20 90 2e 91 0a 0a 41 20 70 | period .....A p| 0000fbe0 65 72 69 6f 64 20 6f 6e 20 69 74 27 73 20 6f 77 |eriod on it's ow| 0000fbf0 6e 20 69 73 20 74 72 65 61 74 65 64 20 61 73 20 |n is treated as | 0000fc00 74 68 65 20 73 74 61 72 74 20 6f 66 20 61 20 6e |the start of a n| 0000fc10 75 6d 62 65 72 20 28 65 2e 67 2e 20 94 2e 37 95 |umber (e.g. ..7.| 0000fc20 29 2e 20 20 54 68 69 73 20 77 61 72 6e 69 6e 67 |). This warning| 0000fc30 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 69 66 | is generated if| 0000fc40 20 61 20 73 74 61 74 65 6d 65 6e 74 20 73 74 61 | a statement sta| 0000fc50 72 74 73 20 77 69 74 68 20 61 20 70 65 72 69 6f |rts with a perio| 0000fc60 64 20 61 6e 64 20 69 74 20 69 73 20 6e 6f 74 20 |d and it is not | 0000fc70 69 6e 20 74 68 65 20 61 73 73 65 6d 62 6c 65 72 |in the assembler| 0000fc80 2e 0a 0a 0a 0a 09 34 09 4d 69 73 6d 61 74 63 68 |......4.Mismatch| 0000fc90 65 64 20 71 75 6f 74 65 73 20 90 22 91 0a 0a 45 |ed quotes ."...E| 0000fca0 76 65 72 79 20 6c 69 6e 65 20 73 68 6f 75 6c 64 |very line should| 0000fcb0 20 68 61 76 65 20 6d 61 74 63 68 69 6e 67 20 71 | have matching q| 0000fcc0 75 6f 74 65 73 2e 0a 0a 0a 0a 09 35 09 4d 61 6c |uotes......5.Mal| 0000fcd0 66 6f 72 6d 65 64 20 68 65 78 61 64 65 63 69 6d |formed hexadecim| 0000fce0 61 6c 20 6e 75 6d 62 65 72 0a 0a 49 74 20 69 73 |al number..It is| 0000fcf0 20 65 78 70 65 63 74 65 64 20 74 68 61 74 20 61 | expected that a| 0000fd00 20 64 69 67 69 74 20 6f 72 20 61 20 6c 65 74 74 | digit or a lett| 0000fd10 65 72 20 5b 30 2d 39 61 2d 66 41 2d 46 5d 20 63 |er [0-9a-fA-F] c| 0000fd20 6f 6d 65 73 20 61 66 74 65 72 20 61 6e 20 26 2e |omes after an &.| 0000fd30 0a 0a 0a 0a 09 36 09 4d 61 6c 66 6f 72 6d 65 64 |.....6.Malformed| 0000fd40 20 62 69 6e 61 72 79 20 6e 75 6d 62 65 72 0a 0a | binary number..| 0000fd50 49 74 20 69 73 20 65 78 70 65 63 74 65 64 20 74 |It is expected t| 0000fd60 68 61 74 20 61 20 30 20 6f 72 20 31 20 63 6f 6d |hat a 0 or 1 com| 0000fd70 65 73 20 61 66 74 65 72 20 61 20 25 2e 0a 0a 0a |es after a %....| 0000fd80 0a 09 37 09 4c 69 6e 65 20 6e 75 6d 62 65 72 20 |..7.Line number | 0000fd90 72 65 66 65 72 65 6e 63 65 20 66 6f 75 6e 64 0a |reference found.| 0000fda0 0a 54 68 69 73 20 69 73 20 67 69 76 65 6e 20 69 |.This is given i| 0000fdb0 66 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 20 61 |f line numbers a| 0000fdc0 72 65 20 66 6f 75 6e 64 20 69 6e 20 61 6e 79 20 |re found in any | 0000fdd0 6c 69 62 72 61 72 69 65 73 2c 20 73 69 6e 63 65 |libraries, since| 0000fde0 20 74 68 65 72 65 20 69 73 20 6e 6f 20 76 61 6c | there is no val| 0000fdf0 69 64 20 72 65 61 73 6f 6e 20 66 6f 72 20 74 68 |id reason for th| 0000fe00 65 6d 20 62 65 69 6e 67 20 74 68 65 72 65 2e 0a |em being there..| 0000fe10 0a 0a 0a 09 38 09 45 78 70 65 63 74 69 6e 67 20 |....8.Expecting | 0000fe20 72 6f 75 74 69 6e 65 20 6e 61 6d 65 20 61 66 74 |routine name aft| 0000fe30 65 72 20 50 52 4f 43 20 6f 72 20 46 4e 0a 0a 41 |er PROC or FN..A| 0000fe40 20 6e 6f 6e 2d 6c 61 62 65 6c 20 63 68 61 72 61 | non-label chara| 0000fe50 63 74 65 72 20 77 61 73 20 66 6f 75 6e 64 20 61 |cter was found a| 0000fe60 66 74 65 72 20 6f 6e 65 20 6f 66 20 74 68 65 73 |fter one of thes| 0000fe70 65 20 74 6f 6b 65 6e 73 2e 20 20 54 68 69 73 20 |e tokens. This | 0000fe80 76 65 72 79 20 75 6e 6c 69 6b 65 6c 79 2e 0a 0a |very unlikely...| 0000fe90 0a 0a 09 39 09 45 4e 44 50 52 4f 43 20 6e 6f 74 |...9.ENDPROC not| 0000fea0 20 61 74 20 65 6e 64 20 6f 66 20 70 72 6f 63 65 | at end of proce| 0000feb0 64 75 72 65 0a 0a 54 68 69 73 20 69 73 20 67 65 |dure..This is ge| 0000fec0 6e 65 72 61 74 65 64 20 69 66 20 45 4e 44 50 52 |nerated if ENDPR| 0000fed0 4f 43 20 69 73 20 66 6f 75 6e 64 20 6f 6e 20 61 |OC is found on a| 0000fee0 20 6c 69 6e 65 20 63 6f 6e 74 61 69 6e 69 6e 67 | line containing| 0000fef0 20 61 6e 20 49 46 2c 20 69 2e 65 2e 20 69 74 20 | an IF, i.e. it | 0000ff00 69 73 20 61 6d 62 69 67 75 6f 75 73 20 61 73 20 |is ambiguous as | 0000ff10 74 6f 20 77 68 65 74 68 65 72 20 74 68 69 73 20 |to whether this | 0000ff20 69 73 20 74 68 65 20 67 65 6e 75 69 6e 65 20 65 |is the genuine e| 0000ff30 6e 64 20 6f 66 20 74 68 65 20 70 72 6f 63 65 64 |nd of the proced| 0000ff40 75 72 65 2e 20 20 4d 6f 73 74 20 6f 66 20 74 68 |ure. Most of th| 0000ff50 65 20 74 69 6d 65 20 74 68 69 73 20 63 61 75 73 |e time this caus| 0000ff60 65 73 20 6e 6f 20 70 72 6f 62 6c 65 6d 73 2c 20 |es no problems, | 0000ff70 62 75 74 20 66 6f 72 20 73 68 6f 72 74 20 72 6f |but for short ro| 0000ff80 75 74 69 6e 65 73 20 77 68 65 72 65 20 74 68 69 |utines where thi| 0000ff90 73 20 69 73 20 74 68 65 20 6f 6e 6c 79 20 77 61 |s is the only wa| 0000ffa0 79 20 69 74 20 65 78 69 74 73 20 74 68 65 6e 20 |y it exits then | 0000ffb0 42 61 73 43 6f 6d 70 72 65 73 73 20 77 69 6c 6c |BasCompress will| 0000ffc0 20 67 65 74 20 63 6f 6e 66 75 73 65 64 20 61 73 | get confused as| 0000ffd0 20 74 6f 20 74 68 65 20 65 78 61 63 74 20 65 6e | to the exact en| 0000ffe0 64 20 6f 66 20 74 68 65 20 72 6f 75 74 69 6e 65 |d of the routine| 0000fff0 2e 20 20 49 6e 20 74 68 69 73 20 63 61 73 65 20 |. In this case | 00010000 79 6f 75 20 6d 75 73 74 20 65 69 74 68 65 72 20 |you must either | 00010010 72 65 2d 63 6f 64 65 20 74 68 65 20 72 6f 75 74 |re-code the rout| 00010020 69 6e 65 20 28 72 65 63 6f 6d 6d 65 6e 64 65 64 |ine (recommended| 00010030 29 20 6f 72 20 69 6e 73 65 72 74 20 61 20 64 75 |) or insert a du| 00010040 6d 6d 79 20 72 6f 75 74 69 6e 65 20 74 65 72 6d |mmy routine term| 00010050 69 6e 61 74 6f 72 20 28 45 4e 44 50 52 4f 43 20 |inator (ENDPROC | 00010060 6f 72 20 3d a0 3c 65 78 70 72 3e 29 2e 0a 0a 0a |or =.<expr>)....| 00010070 0a 09 31 30 09 3d 20 6e 6f 74 20 61 74 20 65 6e |..10.= not at en| 00010080 64 20 6f 66 20 66 75 6e 63 74 69 6f 6e 0a 0a 54 |d of function..T| 00010090 68 69 73 20 69 73 20 67 65 6e 65 72 61 74 65 64 |his is generated| 000100a0 20 69 66 20 61 6e 20 94 3d 20 3c 65 78 70 72 3e | if an .= <expr>| 000100b0 95 20 69 73 20 66 6f 75 6e 64 20 6f 6e 20 61 20 |. is found on a | 000100c0 6c 69 6e 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 |line containing | 000100d0 61 6e 20 49 46 2c 20 69 2e 65 2e 20 69 74 20 69 |an IF, i.e. it i| 000100e0 73 20 61 6d 62 69 67 75 6f 75 73 20 61 73 20 74 |s ambiguous as t| 000100f0 6f 20 77 68 65 74 68 65 72 20 74 68 69 73 20 69 |o whether this i| 00010100 73 20 74 68 65 20 67 65 6e 75 69 6e 65 20 65 6e |s the genuine en| 00010110 64 20 6f 66 20 74 68 65 20 66 75 6e 63 74 69 6f |d of the functio| 00010120 6e 2e 20 20 4d 6f 73 74 20 6f 66 20 74 68 65 20 |n. Most of the | 00010130 74 69 6d 65 20 74 68 69 73 20 63 61 75 73 65 73 |time this causes| 00010140 20 6e 6f 20 70 72 6f 62 6c 65 6d 73 2c 20 62 75 | no problems, bu| 00010150 74 20 66 6f 72 20 73 68 6f 72 74 20 72 6f 75 74 |t for short rout| 00010160 69 6e 65 73 20 77 68 65 72 65 20 74 68 69 73 20 |ines where this | 00010170 69 73 20 74 68 65 20 6f 6e 6c 79 20 77 61 79 20 |is the only way | 00010180 69 74 20 65 78 69 74 73 20 74 68 65 6e 20 42 61 |it exits then Ba| 00010190 73 43 6f 6d 70 72 65 73 73 20 77 69 6c 6c 20 67 |sCompress will g| 000101a0 65 74 20 63 6f 6e 66 75 73 65 64 20 61 73 20 74 |et confused as t| 000101b0 6f 20 74 68 65 20 65 78 61 63 74 20 65 6e 64 20 |o the exact end | 000101c0 6f 66 20 74 68 65 20 72 6f 75 74 69 6e 65 2e 20 |of the routine. | 000101d0 20 49 6e 20 74 68 69 73 20 63 61 73 65 20 79 6f | In this case yo| 000101e0 75 20 6d 75 73 74 20 65 69 74 68 65 72 20 72 65 |u must either re| 000101f0 2d 63 6f 64 65 20 74 68 65 20 72 6f 75 74 69 6e |-code the routin| 00010200 65 20 28 72 65 63 6f 6d 6d 65 6e 64 65 64 29 20 |e (recommended) | 00010210 6f 72 20 69 6e 73 65 72 74 20 61 20 64 75 6d 6d |or insert a dumm| 00010220 79 20 72 6f 75 74 69 6e 65 20 74 65 72 6d 69 6e |y routine termin| 00010230 61 74 6f 72 20 28 45 4e 44 50 52 4f 43 20 6f 72 |ator (ENDPROC or| 00010240 20 3d a0 3c 65 78 70 72 3e 29 2e 0a 0a 0a 0a 09 | =.<expr>)......| 00010250 31 31 09 43 6f 64 65 20 66 6f 75 6e 64 20 6f 6e |11.Code found on| 00010260 20 6c 61 73 74 20 6c 69 6e 65 20 6f 66 20 66 75 | last line of fu| 00010270 6e 63 74 69 6f 6e 0a 0a 54 68 65 72 65 20 77 65 |nction..There we| 00010280 72 65 20 6d 6f 72 65 20 73 74 61 74 65 6d 65 6e |re more statemen| 00010290 74 73 20 6f 6e 20 74 68 65 20 73 61 6d 65 20 6c |ts on the same l| 000102a0 69 6e 65 20 61 73 20 74 68 65 20 74 65 72 6d 69 |ine as the termi| 000102b0 6e 61 74 69 6e 67 20 94 3d 20 3c 65 78 70 72 3e |nating .= <expr>| 000102c0 95 20 73 74 61 74 65 6d 65 6e 74 2e 20 20 53 69 |. statement. Si| 000102d0 6e 63 65 20 74 68 65 73 65 20 77 69 6c 6c 20 6e |nce these will n| 000102e0 65 76 65 72 20 62 65 20 65 78 65 63 75 74 65 64 |ever be executed| 000102f0 20 62 79 20 42 61 73 69 63 20 74 68 65 6e 20 74 | by Basic then t| 00010300 68 65 79 20 73 68 6f 75 6c 64 20 62 65 20 72 65 |hey should be re| 00010310 6d 6f 76 65 64 2e 20 20 54 68 69 73 20 77 61 72 |moved. This war| 00010320 6e 69 6e 67 20 63 6f 75 6c 64 20 77 65 6c 6c 20 |ning could well | 00010330 74 75 72 6e 20 75 70 20 71 75 69 74 65 20 6f 66 |turn up quite of| 00010340 74 65 6e 20 69 66 20 42 61 73 43 6f 6d 70 72 65 |ten if BasCompre| 00010350 73 73 20 69 73 20 66 65 64 20 74 68 65 20 6f 75 |ss is fed the ou| 00010360 74 70 75 74 20 6f 66 20 6f 74 68 65 72 20 73 71 |tput of other sq| 00010370 75 61 73 68 65 72 73 2e 0a 0a 0a 0a 09 31 32 09 |uashers......12.| 00010380 45 78 70 65 63 74 69 6e 67 20 61 20 73 74 72 69 |Expecting a stri| 00010390 6e 67 20 61 66 74 65 72 20 4c 49 42 52 41 52 59 |ng after LIBRARY| 000103a0 2f 49 4e 53 54 41 4c 4c 0a 0a 49 6e 20 6f 72 64 |/INSTALL..In ord| 000103b0 65 72 20 74 6f 20 62 65 20 61 62 6c 65 20 74 6f |er to be able to| 000103c0 20 6c 6f 61 64 20 69 6e 20 6c 69 62 72 61 72 69 | load in librari| 000103d0 65 73 20 42 61 73 43 6f 6d 70 72 65 73 73 20 65 |es BasCompress e| 000103e0 78 70 65 63 74 73 20 61 20 73 69 6d 70 6c 65 20 |xpects a simple | 000103f0 63 6f 6e 73 74 61 6e 74 20 73 74 72 69 6e 67 20 |constant string | 00010400 65 78 70 72 65 73 73 69 6f 6e 20 74 6f 20 66 6f |expression to fo| 00010410 6c 6c 6f 77 20 74 68 65 73 65 20 6b 65 79 77 6f |llow these keywo| 00010420 72 64 73 2e 20 20 49 66 20 74 68 69 73 20 69 73 |rds. If this is| 00010430 20 6e 6f 74 20 74 68 65 20 63 61 73 65 20 74 68 | not the case th| 00010440 65 6e 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 |en you will need| 00010450 20 74 6f 20 73 65 74 20 75 70 20 61 20 53 70 65 | to set up a Spe| 00010460 63 69 61 6c 20 66 69 6c 65 20 74 6f 20 68 61 6e |cial file to han| 00010470 64 6c 65 20 74 68 69 73 20 73 69 74 75 61 74 69 |dle this situati| 00010480 6f 6e 2e 20 20 54 68 69 73 20 77 61 72 6e 69 6e |on. This warnin| 00010490 67 20 69 73 20 73 75 70 70 72 65 73 73 65 64 20 |g is suppressed | 000104a0 69 66 20 69 6e 73 69 64 65 20 61 20 53 70 65 63 |if inside a Spec| 000104b0 69 61 6c 20 72 6f 75 74 69 6e 65 2e 0a 0a 0a 0a |ial routine.....| 000104c0 09 31 33 09 4f 56 45 52 4c 41 59 20 66 69 6c 65 |.13.OVERLAY file| 000104d0 28 73 29 20 6e 6f 74 20 73 63 61 6e 6e 65 64 0a |(s) not scanned.| 000104e0 0a 54 68 65 20 4f 56 45 52 4c 41 59 20 6b 65 79 |.The OVERLAY key| 000104f0 77 6f 72 64 20 69 73 20 6e 6f 74 20 73 75 70 70 |word is not supp| 00010500 6f 72 74 65 64 20 62 79 20 42 61 73 43 6f 6d 70 |orted by BasComp| 00010510 72 65 73 73 2e 0a 0a 0a 0a 09 31 34 09 55 6e 65 |ress......14.Une| 00010520 78 70 65 63 74 65 64 20 90 5b 91 0a 0a 41 20 72 |xpected .[...A r| 00010530 75 6e 6e 69 6e 67 20 74 6f 74 61 6c 20 6f 66 20 |unning total of | 00010540 73 71 75 61 72 65 20 62 72 61 63 6b 65 74 73 20 |square brackets | 00010550 69 73 20 6b 65 70 74 2e 20 20 54 68 69 73 20 69 |is kept. This i| 00010560 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 73 6f |ndicates that so| 00010570 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 94 4c 44 |mething like .LD| 00010580 52 a0 52 30 2c a0 5b 5b 52 31 2e 2e 2e 5d 95 20 |R.R0,.[[R1...]. | 00010590 77 61 73 20 66 6f 75 6e 64 2e 0a 0a 0a 0a 09 31 |was found......1| 000105a0 35 09 55 6e 65 78 70 65 63 74 65 64 20 90 5d 91 |5.Unexpected .].| 000105b0 0a 0a 41 20 72 75 6e 6e 69 6e 67 20 74 6f 74 61 |..A running tota| 000105c0 6c 20 6f 66 20 73 71 75 61 72 65 20 62 72 61 63 |l of square brac| 000105d0 6b 65 74 73 20 69 73 20 6b 65 70 74 2e 20 20 54 |kets is kept. T| 000105e0 68 69 73 20 69 6e 64 69 63 61 74 65 73 20 74 68 |his indicates th| 000105f0 61 74 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b |at something lik| 00010600 65 20 94 4c 44 52 a0 52 30 2c a0 5b 52 31 2e 2e |e .LDR.R0,.[R1..| 00010610 2e 5d 5d 95 20 77 61 73 20 66 6f 75 6e 64 2e 0a |.]]. was found..| 00010620 0a 0a 0a 09 31 36 09 45 4e 44 50 52 4f 43 20 69 |....16.ENDPROC i| 00010630 6e 73 69 64 65 20 61 20 25 73 20 73 74 72 75 63 |nside a %s struc| 00010640 74 75 72 65 0a 0a 46 6f 75 6e 64 20 61 20 63 6f |ture..Found a co| 00010650 6e 64 69 74 69 6f 6e 61 6c 20 65 78 69 74 20 66 |nditional exit f| 00010660 72 6f 6d 20 61 20 70 72 6f 63 65 64 75 72 65 20 |rom a procedure | 00010670 2d 20 74 68 69 73 20 69 6e 64 69 63 61 74 65 73 |- this indicates| 00010680 20 61 20 62 61 64 20 70 72 6f 67 72 61 6d 6d 69 | a bad programmi| 00010690 6e 67 20 73 74 79 6c 65 2e 0a 0a 0a 0a 09 31 37 |ng style......17| 000106a0 09 3d 20 69 6e 73 69 64 65 20 61 20 25 73 20 73 |.= inside a %s s| 000106b0 74 72 75 63 74 75 72 65 0a 0a 46 6f 75 6e 64 20 |tructure..Found | 000106c0 61 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 20 65 78 |a conditional ex| 000106d0 69 74 20 66 72 6f 6d 20 61 20 66 75 6e 63 74 69 |it from a functi| 000106e0 6f 6e 20 2d 20 74 68 69 73 20 69 6e 64 69 63 61 |on - this indica| 000106f0 74 65 73 20 61 20 62 61 64 20 70 72 6f 67 72 61 |tes a bad progra| 00010700 6d 6d 69 6e 67 20 73 74 79 6c 65 2e 0a 0a 0a 0a |mming style.....| 00010710 09 31 38 09 43 6f 6e 64 69 74 69 6f 6e 61 6c 20 |.18.Conditional | 00010720 25 25 73 0a 0a 46 6f 75 6e 64 20 61 20 63 6f 6e |%%s..Found a con| 00010730 64 69 74 69 6f 6e 61 6c 20 74 65 72 6d 69 6e 61 |ditional termina| 00010740 74 69 6f 6e 20 6f 66 20 61 20 6d 75 6c 74 69 2d |tion of a multi-| 00010750 6c 69 6e 65 20 73 74 72 75 63 74 75 72 65 20 2d |line structure -| 00010760 20 74 68 69 73 20 69 6e 64 69 63 61 74 65 73 20 | this indicates | 00010770 61 20 62 61 64 20 70 72 6f 67 72 61 6d 6d 69 6e |a bad programmin| 00010780 67 20 73 74 79 6c 65 2e 0a 0a 54 68 69 73 20 6d |g style...This m| 00010790 61 79 20 6f 63 63 75 72 20 6f 6e 20 6c 69 6e 65 |ay occur on line| 000107a0 73 20 6c 69 6b 65 20 74 68 65 20 66 6f 6c 6c 6f |s like the follo| 000107b0 77 69 6e 67 3a 0a 0a 09 49 46 20 78 3e 30 20 54 |wing:...IF x>0 T| 000107c0 48 45 4e 20 57 48 49 4c 45 20 78 3e 30 3a 79 2b |HEN WHILE x>0:y+| 000107d0 3d 46 4e 79 28 78 29 3a 78 2d 3d 31 3a 45 4e 44 |=FNy(x):x-=1:END| 000107e0 57 48 49 4c 45 0a 0a 55 6e 66 6f 72 74 75 6e 61 |WHILE..Unfortuna| 000107f0 74 65 6c 79 20 42 61 73 43 6f 6d 70 72 65 73 73 |tely BasCompress| 00010800 20 64 6f 65 73 20 6e 6f 74 20 6c 69 6b 65 20 74 | does not like t| 00010810 68 69 73 20 62 65 63 61 75 73 65 20 69 74 20 65 |his because it e| 00010820 78 70 65 63 74 73 20 61 6c 6c 20 6d 75 6c 74 69 |xpects all multi| 00010830 2d 6c 69 6e 65 20 63 6f 6e 73 74 72 75 63 74 73 |-line constructs| 00010840 20 74 6f 20 73 74 61 72 74 20 75 6e 63 6f 6e 64 | to start uncond| 00010850 69 74 69 6f 6e 61 6c 6c 79 2e 20 20 54 6f 20 63 |itionally. To c| 00010860 75 72 65 20 74 68 69 73 20 73 70 6c 69 74 20 74 |ure this split t| 00010870 68 65 20 6f 6e 65 2d 6c 69 6e 65 20 49 46 20 69 |he one-line IF i| 00010880 6e 74 6f 20 61 20 6d 75 6c 74 69 2d 6c 69 6e 65 |nto a multi-line| 00010890 20 49 46 2e 0a 0a 0a 0a 09 31 39 09 54 6f 6f 20 | IF......19.Too | 000108a0 6d 61 6e 79 20 90 28 91 20 66 6f 75 6e 64 0a 0a |many .(. found..| 000108b0 41 20 72 75 6e 6e 69 6e 67 20 74 6f 74 61 6c 20 |A running total | 000108c0 6f 66 20 65 6c 6c 69 70 73 69 73 20 69 73 20 6b |of ellipsis is k| 000108d0 65 70 74 2e 20 20 54 68 69 73 20 69 6e 64 69 63 |ept. This indic| 000108e0 61 74 65 73 20 73 6f 6d 65 74 68 69 6e 67 20 6c |ates something l| 000108f0 69 6b 65 20 94 28 31 2b 32 29 28 95 20 77 61 73 |ike .(1+2)(. was| 00010900 20 66 6f 75 6e 64 2e 0a 0a 0a 0a 09 32 30 09 55 | found......20.U| 00010910 6e 65 78 70 65 63 74 65 64 20 90 29 91 20 66 6f |nexpected .). fo| 00010920 75 6e 64 0a 0a 41 20 72 75 6e 6e 69 6e 67 20 74 |und..A running t| 00010930 6f 74 61 6c 20 6f 66 20 65 6c 6c 69 70 73 69 73 |otal of ellipsis| 00010940 20 69 73 20 6b 65 70 74 2e 20 20 54 68 69 73 20 | is kept. This | 00010950 69 6e 64 69 63 61 74 65 73 20 73 6f 6d 65 74 68 |indicates someth| 00010960 69 6e 67 20 6c 69 6b 65 20 94 28 31 2b 32 29 29 |ing like .(1+2))| 00010970 95 20 77 61 73 20 66 6f 75 6e 64 2e 0a 0a 0a 0a |. was found.....| 00010980 09 32 31 09 52 6f 75 74 69 6e 65 20 25 73 20 61 |.21.Routine %s a| 00010990 6c 72 65 61 64 79 20 64 65 66 69 6e 65 64 20 61 |lready defined a| 000109a0 74 20 25 73 0a 0a 54 68 69 73 20 77 61 72 6e 73 |t %s..This warns| 000109b0 20 61 62 6f 75 74 20 6d 75 6c 74 69 70 6c 79 2d | about multiply-| 000109c0 64 65 66 69 6e 65 64 20 72 6f 75 74 69 6e 65 73 |defined routines| 000109d0 2e 20 20 53 69 6e 63 65 20 74 68 65 72 65 20 61 |. Since there a| 000109e0 72 65 20 73 6f 6d 65 74 69 6d 65 73 20 76 65 72 |re sometimes ver| 000109f0 79 20 67 6f 6f 64 20 72 65 61 73 6f 6e 73 20 66 |y good reasons f| 00010a00 6f 72 20 64 6f 69 6e 67 20 74 68 69 73 20 74 68 |or doing this th| 00010a10 69 73 20 77 61 72 6e 69 6e 67 20 63 61 6e 20 62 |is warning can b| 00010a20 65 20 73 75 70 70 72 65 73 73 65 64 2e 0a 0a 0a |e suppressed....| 00010a30 0a 09 32 32 09 4d 61 6c 66 6f 72 6d 65 64 20 64 |..22.Malformed d| 00010a40 65 63 69 6d 61 6c 20 6e 75 6d 62 65 72 0a 0a 41 |ecimal number..A| 00010a50 20 62 61 64 20 64 65 63 69 6d 61 6c 20 6e 75 6d | bad decimal num| 00010a60 62 65 72 20 77 61 73 20 66 6f 75 6e 64 2e 20 20 |ber was found. | 00010a70 41 20 64 65 63 69 6d 61 6c 20 6e 75 6d 62 65 72 |A decimal number| 00010a80 20 69 73 20 73 6f 6d 65 74 68 69 6e 67 20 62 65 | is something be| 00010a90 67 69 6e 6e 69 6e 67 20 77 69 74 68 20 61 20 64 |ginning with a d| 00010aa0 69 67 69 74 20 6f 72 20 61 20 70 65 72 69 6f 64 |igit or a period| 00010ab0 20 61 6e 64 20 63 6f 6e 74 69 6e 75 69 6e 67 20 | and continuing | 00010ac0 61 73 20 65 78 70 65 63 74 65 64 2e 20 20 54 68 |as expected. Th| 00010ad0 65 20 66 6f 72 6d 20 6f 66 20 74 68 65 20 6e 75 |e form of the nu| 00010ae0 6d 62 65 72 20 69 73 20 61 6c 77 61 79 73 20 63 |mber is always c| 00010af0 68 65 63 6b 65 64 2c 20 62 75 74 20 74 68 65 20 |hecked, but the | 00010b00 63 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 61 79 20 |compression may | 00010b10 62 65 20 74 75 72 6e 65 64 20 6f 66 66 2e 0a 0a |be turned off...| 00010b20 0a 0a 09 32 33 09 54 68 65 20 28 67 6c 6f 62 61 |...23.The (globa| 00010b30 6c 29 20 73 70 65 63 69 61 6c 20 72 6f 75 74 69 |l) special routi| 00010b40 6e 65 20 25 73 20 69 73 20 6e 6f 74 20 64 65 66 |ne %s is not def| 00010b50 69 6e 65 64 20 61 6e 79 77 68 65 72 65 0a 0a 54 |ined anywhere..T| 00010b60 68 69 73 20 73 70 65 61 6b 73 20 66 6f 72 20 69 |his speaks for i| 00010b70 74 73 65 6c 66 2e 20 20 49 74 20 69 73 20 6f 6e |tself. It is on| 00010b80 6c 79 20 67 65 6e 65 72 61 74 65 64 20 69 66 20 |ly generated if | 00010b90 74 68 65 20 75 73 65 72 20 68 61 73 20 61 73 6b |the user has ask| 00010ba0 65 64 20 66 6f 72 20 69 74 2c 20 61 73 20 69 74 |ed for it, as it| 00010bb0 20 69 73 20 6e 6f 74 20 75 73 75 61 6c 6c 79 20 | is not usually | 00010bc0 72 65 6c 65 76 61 6e 74 2e 0a 0a 0a 0a 09 32 34 |relevant......24| 00010bd0 09 53 57 49 20 6e 61 6d 65 20 6d 69 73 73 69 6e |.SWI name missin| 00010be0 67 2c 20 6f 72 20 6e 6f 74 20 73 69 6d 70 6c 65 |g, or not simple| 00010bf0 0a 0a 49 74 20 69 73 20 6e 6f 72 6d 61 6c 20 74 |..It is normal t| 00010c00 6f 20 6a 75 73 74 20 68 61 76 65 20 61 20 73 74 |o just have a st| 00010c10 72 69 6e 67 2c 20 76 61 72 69 61 62 6c 65 2c 20 |ring, variable, | 00010c20 6f 72 20 6e 75 6d 62 65 72 20 69 6d 6d 65 64 69 |or number immedi| 00010c30 61 74 65 6c 79 20 61 66 74 65 72 20 61 20 53 59 |ately after a SY| 00010c40 53 20 28 53 57 49 29 2e 20 20 54 68 69 73 20 69 |S (SWI). This i| 00010c50 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 66 6f |ndicates that fo| 00010c60 75 6e 64 20 73 6f 6d 65 74 68 69 6e 67 20 65 6c |und something el| 00010c70 73 65 20 2d 20 77 68 69 63 68 20 6d 61 79 20 69 |se - which may i| 00010c80 6e 64 69 63 61 74 65 20 61 20 73 79 6e 74 61 78 |ndicate a syntax| 00010c90 20 65 72 72 6f 72 2e 0a 0a 0a 0a 09 32 35 09 53 | error......25.S| 00010ca0 57 49 20 90 25 73 91 20 69 73 20 75 6e 6b 6e 6f |WI .%s. is unkno| 00010cb0 77 6e 0a 0a 54 68 65 20 6f 70 65 72 61 74 69 6e |wn..The operatin| 00010cc0 67 20 73 79 73 74 65 6d 20 68 61 73 20 6e 6f 20 |g system has no | 00010cd0 72 65 63 6f 72 64 20 6f 66 20 77 68 61 74 20 74 |record of what t| 00010ce0 68 69 73 20 53 57 49 20 6d 65 61 6e 73 2e 20 20 |his SWI means. | 00010cf0 54 68 69 73 20 69 6e 64 69 63 61 74 65 73 20 74 |This indicates t| 00010d00 68 61 74 20 65 69 74 68 65 72 20 74 68 65 20 6d |hat either the m| 00010d10 6f 64 75 6c 65 20 69 73 20 6e 6f 74 20 6c 6f 61 |odule is not loa| 00010d20 64 65 64 20 61 74 20 74 68 65 20 74 69 6d 65 20 |ded at the time | 00010d30 6f 66 20 63 6f 6d 70 72 65 73 73 69 6f 6e 2c 20 |of compression, | 00010d40 6f 72 20 69 74 20 69 73 20 6d 69 73 73 70 65 6c |or it is misspel| 00010d50 74 2e 20 20 42 61 73 43 6f 6d 70 72 65 73 73 20 |t. BasCompress | 00010d60 77 69 6c 6c 20 6c 65 61 76 65 20 69 74 20 61 73 |will leave it as| 00010d70 20 69 74 20 69 73 2c 20 70 72 6f 64 75 63 69 6e | it is, producin| 00010d80 67 20 6c 6f 6e 67 65 72 20 61 6e 64 20 73 6c 6f |g longer and slo| 00010d90 77 65 72 20 63 6f 64 65 2e 0a 0a 0a 0a 09 32 36 |wer code......26| 00010da0 09 43 61 6e 27 74 20 63 68 61 6e 67 65 20 74 6f |.Can't change to| 00010db0 20 73 63 72 65 65 6e 20 6d 6f 64 65 20 25 64 0a | screen mode %d.| 00010dc0 0a 49 66 20 74 68 65 20 6c 69 73 74 69 6e 67 20 |.If the listing | 00010dd0 4d 6f 64 65 20 63 6f 75 6c 64 20 6e 6f 74 20 62 |Mode could not b| 00010de0 65 20 66 6f 75 6e 64 2c 20 62 75 74 20 61 20 73 |e found, but a s| 00010df0 75 69 74 61 62 6c 65 20 61 6c 74 65 72 6e 61 74 |uitable alternat| 00010e00 69 76 65 20 77 61 73 20 70 6f 73 73 69 62 6c 65 |ive was possible| 00010e10 2e 0a 0a 0a 0a 09 32 37 09 53 70 65 63 69 61 6c |......27.Special| 00010e20 20 76 61 72 69 61 62 6c 65 20 25 73 20 68 61 73 | variable %s has| 00010e30 20 62 65 65 6e 20 75 73 65 64 0a 0a 09 32 38 09 | been used...28.| 00010e40 53 70 65 63 69 61 6c 20 72 6f 75 74 69 6e 65 20 |Special routine | 00010e50 25 73 20 68 61 73 20 62 65 65 6e 20 75 73 65 64 |%s has been used| 00010e60 0a 0a 09 32 39 09 53 70 65 63 69 61 6c 20 6c 69 |...29.Special li| 00010e70 62 72 61 72 79 20 25 73 20 68 61 73 20 62 65 65 |brary %s has bee| 00010e80 6e 20 75 73 65 64 0a 0a 54 68 65 73 65 20 77 61 |n used..These wa| 00010e90 72 6e 69 6e 67 73 20 61 72 65 20 67 65 6e 65 72 |rnings are gener| 00010ea0 61 74 65 64 20 69 66 20 74 68 65 20 75 73 65 72 |ated if the user| 00010eb0 20 68 61 73 20 74 75 72 6e 65 64 20 74 68 65 6d | has turned them| 00010ec0 20 6f 6e 2e 20 20 54 68 65 79 20 73 68 6f 77 20 | on. They show | 00010ed0 74 68 65 20 72 65 73 75 6c 74 73 20 6f 66 20 6c |the results of l| 00010ee0 61 62 65 6c 20 65 78 70 61 6e 73 69 6f 6e 20 64 |abel expansion d| 00010ef0 6f 6e 65 20 61 74 20 74 68 65 20 69 6e 73 74 61 |one at the insta| 00010f00 6e 63 65 20 6f 66 20 61 20 63 61 6c 6c 20 74 6f |nce of a call to| 00010f10 20 61 20 53 70 65 63 69 61 6c 20 72 6f 75 74 69 | a Special routi| 00010f20 6e 65 2e 0a 0a 0a 0a 37 2e 33 20 45 72 72 6f 72 |ne.....7.3 Error| 00010f30 73 0a 0a 41 6e 79 20 65 72 72 6f 72 73 20 65 6e |s..Any errors en| 00010f40 63 6f 75 6e 74 65 72 65 64 20 77 69 6c 6c 20 73 |countered will s| 00010f50 74 6f 70 20 74 68 65 20 66 69 6e 61 6c 20 6f 75 |top the final ou| 00010f60 74 70 75 74 20 70 68 61 73 65 2c 20 62 75 74 20 |tput phase, but | 00010f70 74 68 65 20 70 72 6f 67 72 61 6d 20 77 69 6c 6c |the program will| 00010f80 20 73 6f 6c 64 69 65 72 20 6f 6e 20 70 61 72 73 | soldier on pars| 00010f90 69 6e 67 2c 20 73 6f 20 79 6f 75 20 63 61 6e 20 |ing, so you can | 00010fa0 72 65 63 74 69 66 79 20 61 6c 6c 20 74 68 65 20 |rectify all the | 00010fb0 65 72 72 6f 72 73 20 69 6e 20 6f 6e 65 20 68 69 |errors in one hi| 00010fc0 74 2e 0a 0a 0a 0a 09 32 09 45 4e 44 50 52 4f 43 |t......2.ENDPROC| 00010fd0 20 66 6f 75 6e 64 20 69 6e 20 61 20 66 75 6e 63 | found in a func| 00010fe0 74 69 6f 6e 0a 0a 54 68 69 73 20 69 6e 76 61 72 |tion..This invar| 00010ff0 69 61 62 6c 79 20 66 6f 6c 6c 6f 77 73 20 77 61 |iably follows wa| 00011000 72 6e 69 6e 67 20 32 2c 20 61 62 6f 75 74 20 44 |rning 2, about D| 00011010 45 46 20 66 6f 75 6e 64 20 69 6e 73 69 64 65 20 |EF found inside | 00011020 61 20 72 6f 75 74 69 6e 65 2c 20 77 68 69 63 68 |a routine, which| 00011030 20 69 74 73 65 6c 66 20 66 6f 6c 6c 6f 77 73 20 | itself follows | 00011040 61 20 77 61 72 6e 69 6e 67 20 31 30 2c 20 62 65 |a warning 10, be| 00011050 63 61 75 73 65 20 74 68 65 20 70 72 65 76 69 6f |cause the previo| 00011060 75 73 20 66 75 6e 63 74 69 6f 6e 20 64 69 64 20 |us function did | 00011070 6e 6f 74 20 74 65 72 6d 69 6e 61 74 65 20 63 6c |not terminate cl| 00011080 65 61 6e 6c 79 2e 0a 0a 0a 0a 09 33 09 3d 20 66 |eanly......3.= f| 00011090 6f 75 6e 64 20 69 6e 20 61 20 70 72 6f 63 65 64 |ound in a proced| 000110a0 75 72 65 0a 0a 54 68 69 73 20 69 6e 76 61 72 69 |ure..This invari| 000110b0 61 62 6c 79 20 66 6f 6c 6c 6f 77 73 20 20 77 61 |ably follows wa| 000110c0 72 6e 69 6e 67 20 32 2c 20 61 62 6f 75 74 20 44 |rning 2, about D| 000110d0 45 46 20 66 6f 75 6e 64 20 69 6e 73 69 64 65 20 |EF found inside | 000110e0 61 20 72 6f 75 74 69 6e 65 2c 20 77 68 69 63 68 |a routine, which| 000110f0 20 69 74 73 65 6c 66 20 66 6f 6c 6c 6f 77 73 20 | itself follows | 00011100 61 20 77 61 72 6e 69 6e 67 20 39 2c 20 62 65 63 |a warning 9, bec| 00011110 61 75 73 65 20 74 68 65 20 70 72 65 76 69 6f 75 |ause the previou| 00011120 73 20 70 72 6f 63 65 64 75 72 65 20 64 69 64 20 |s procedure did | 00011130 6e 6f 74 20 74 65 72 6d 69 6e 61 74 65 20 63 6c |not terminate cl| 00011140 65 61 6e 6c 79 2e 0a 0a 0a 0a 09 34 09 52 6f 75 |eanly......4.Rou| 00011150 74 69 6e 65 20 25 73 20 61 6c 72 65 61 64 79 20 |tine %s already | 00011160 64 65 66 69 6e 65 64 20 61 74 20 25 73 0a 0a 49 |defined at %s..I| 00011170 74 27 73 20 65 69 74 68 65 72 20 61 6e 20 65 72 |t's either an er| 00011180 72 6f 72 20 6f 72 20 61 20 77 61 72 6e 69 6e 67 |ror or a warning| 00011190 20 28 32 31 29 2c 20 61 6e 64 20 74 68 69 73 20 | (21), and this | 000111a0 69 73 20 74 68 65 20 65 72 72 6f 72 2e 0a 0a 0a |is the error....| 000111b0 0a 09 35 09 46 69 6c 65 20 65 72 72 6f 72 3a 20 |..5.File error: | 000111c0 25 73 0a 0a 53 69 6e 63 65 20 74 68 65 72 65 20 |%s..Since there | 000111d0 69 73 20 6d 69 6e 69 6d 61 6c 20 66 69 6c 65 20 |is minimal file | 000111e0 61 63 63 65 73 73 69 6e 67 20 64 6f 6e 65 20 28 |accessing done (| 000111f0 66 69 6c 65 73 20 61 72 65 20 6c 6f 61 64 65 64 |files are loaded| 00011200 20 69 6e 20 6f 6e 65 20 68 69 74 29 2c 20 74 68 | in one hit), th| 00011210 69 73 20 75 73 75 61 6c 6c 79 20 6a 75 73 74 20 |is usually just | 00011220 72 65 70 6f 72 74 73 20 6e 6f 74 20 62 65 69 6e |reports not bein| 00011230 67 20 61 62 6c 65 20 74 6f 20 66 69 6e 64 20 61 |g able to find a| 00011240 20 70 61 72 74 69 63 75 6c 61 72 20 66 69 6c 65 | particular file| 00011250 2f 69 6e 76 61 6c 69 64 20 66 69 6c 65 20 6e 61 |/invalid file na| 00011260 6d 65 20 2d 20 69 74 20 69 73 20 64 65 70 65 6e |me - it is depen| 00011270 64 65 6e 74 20 6f 6e 20 74 68 65 20 75 6e 64 65 |dent on the unde| 00011280 72 6c 79 69 6e 67 20 66 69 6c 69 6e 67 20 73 79 |rlying filing sy| 00011290 73 74 65 6d 2e 0a 0a 0a 0a 09 36 09 45 6e 64 20 |stem......6.End | 000112a0 6f 66 20 66 69 6c 65 20 69 6e 20 6d 69 64 64 6c |of file in middl| 000112b0 65 20 6f 66 20 72 6f 75 74 69 6e 65 0a 0a 49 74 |e of routine..It| 000112c0 20 69 73 20 69 6e 76 61 6c 69 64 20 66 6f 72 20 | is invalid for | 000112d0 61 20 72 6f 75 74 69 6e 65 20 74 6f 20 73 70 61 |a routine to spa| 000112e0 6e 20 61 63 72 6f 73 73 20 61 20 66 69 6c 65 20 |n across a file | 000112f0 62 6f 75 6e 64 61 72 79 2e 0a 0a 0a 0a 09 37 09 |boundary......7.| 00011300 54 6f 6f 20 6d 61 6e 79 20 66 69 6c 65 73 20 28 |Too many files (| 00011310 3e 32 35 34 29 0a 0a 49 20 63 61 6e 27 74 20 66 |>254)..I can't f| 00011320 6f 72 65 73 65 65 20 61 6e 79 6f 6e 65 20 67 65 |oresee anyone ge| 00011330 74 74 69 6e 67 20 74 68 69 73 20 65 72 72 6f 72 |tting this error| 00011340 20 6d 65 73 73 61 67 65 21 20 20 49 74 20 69 73 | message! It is| 00011350 20 75 6e 6c 69 6b 65 6c 79 20 74 68 61 74 20 74 | unlikely that t| 00011360 68 69 73 20 6c 69 6d 69 74 61 74 69 6f 6e 20 77 |his limitation w| 00011370 6f 75 6c 64 20 62 65 20 6c 69 66 74 65 64 2c 20 |ould be lifted, | 00011380 65 69 74 68 65 72 2e 0a 0a 09 38 09 55 6e 64 65 |either....8.Unde| 00011390 66 69 6e 65 64 20 72 6f 75 74 69 6e 65 3a 20 25 |fined routine: %| 000113a0 73 20 28 75 73 65 64 20 25 73 29 0a 0a 47 65 6e |s (used %s)..Gen| 000113b0 65 72 61 74 65 64 20 61 66 74 65 72 20 61 6c 6c |erated after all| 000113c0 20 66 69 6c 65 73 20 68 61 76 65 20 62 65 65 6e | files have been| 000113d0 20 70 61 72 73 65 64 2c 20 69 74 20 77 61 72 6e | parsed, it warn| 000113e0 73 20 6f 66 20 72 6f 75 74 69 6e 65 73 20 75 73 |s of routines us| 000113f0 65 64 20 62 75 74 20 6e 65 76 65 72 20 64 65 66 |ed but never def| 00011400 69 6e 65 64 2e 20 20 54 68 65 73 65 20 61 72 65 |ined. These are| 00011410 20 75 73 75 61 6c 6c 79 20 6f 62 73 63 75 72 65 | usually obscure| 00011420 20 72 6f 75 74 69 6e 65 73 20 6f 6e 6c 79 20 63 | routines only c| 00011430 61 6c 6c 65 64 20 69 6e 20 65 72 72 6f 72 20 68 |alled in error h| 00011440 61 6e 64 6c 65 72 73 2e 20 20 49 66 20 79 6f 75 |andlers. If you| 00011450 20 6b 6e 6f 77 20 66 6f 72 20 73 75 72 65 20 74 | know for sure t| 00011460 68 61 74 20 74 68 69 73 20 72 6f 75 74 69 6e 65 |hat this routine| 00011470 20 77 69 6c 6c 20 6e 65 76 65 72 20 62 65 20 63 | will never be c| 00011480 61 6c 6c 65 64 2c 20 6a 75 73 74 20 70 75 74 20 |alled, just put | 00011490 61 6e 20 65 6d 70 74 79 20 76 65 72 73 69 6f 6e |an empty version| 000114a0 20 69 6e 20 79 6f 75 72 20 6d 61 69 6e 20 66 69 | in your main fi| 000114b0 6c 65 20 74 6f 20 73 75 70 70 72 65 73 73 20 74 |le to suppress t| 000114c0 68 69 73 20 65 72 72 6f 72 2e 0a 0a 0a 0a 09 39 |his error......9| 000114d0 09 55 6e 64 65 66 69 6e 65 64 20 76 61 72 69 61 |.Undefined varia| 000114e0 62 6c 65 3a 20 25 73 20 28 75 73 65 64 20 25 73 |ble: %s (used %s| 000114f0 29 0a 0a 4e 6f 74 20 67 65 6e 65 72 61 74 65 64 |)..Not generated| 00011500 2e 0a 0a 0a 0a 09 31 30 09 46 4f 52 20 6e 6f 74 |......10.FOR not| 00011510 20 61 74 20 73 74 61 72 74 20 6f 66 20 73 74 61 | at start of sta| 00011520 74 65 6d 65 6e 74 0a 0a 54 68 69 73 20 6d 61 79 |tement..This may| 00011530 20 62 65 20 6f 66 20 73 6f 6d 65 20 75 73 65 20 | be of some use | 00011540 2d 20 6e 6f 74 20 6d 75 63 68 2c 20 62 75 74 20 |- not much, but | 00011550 77 68 61 74 20 74 68 65 20 68 65 79 3f 20 20 28 |what the hey? (| 00011560 4d 61 79 62 65 20 62 65 20 6f 6e 20 61 20 6f 6e |Maybe be on a on| 00011570 65 2d 6c 69 6e 65 20 49 46 29 3f 0a 0a 0a 0a 09 |e-line IF)?.....| 00011580 31 31 09 45 73 63 61 70 65 20 70 72 65 73 73 65 |11.Escape presse| 00011590 64 2c 20 70 61 72 73 69 6e 67 20 61 62 6f 72 74 |d, parsing abort| 000115a0 65 64 0a 0a 4e 6f 74 20 67 65 6e 65 72 61 74 65 |ed..Not generate| 000115b0 64 2e 20 20 45 73 63 61 70 65 73 20 6a 75 73 74 |d. Escapes just| 000115c0 20 74 65 72 6d 69 6e 61 74 65 20 70 72 6f 67 72 | terminate progr| 000115d0 61 6d 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 69 |am immediately i| 000115e0 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 76 65 |n the current ve| 000115f0 72 73 69 6f 6e 2e 0a 0a 0a 0a 09 31 32 09 46 69 |rsion......12.Fi| 00011600 6c 65 20 25 73 20 64 6f 65 73 20 6e 6f 74 20 68 |le %s does not h| 00011610 61 76 65 20 61 20 42 61 73 69 63 20 66 69 6c 65 |ave a Basic file| 00011620 20 74 79 70 65 0a 0a 54 68 69 73 20 70 72 6f 67 | type..This prog| 00011630 72 61 6d 20 6f 6e 6c 79 20 61 63 63 65 70 74 73 |ram only accepts| 00011640 20 74 6f 6b 65 6e 69 73 65 64 20 42 61 73 69 63 | tokenised Basic| 00011650 20 66 69 6c 65 73 20 2d 20 6d 61 79 62 65 20 74 | files - maybe t| 00011660 68 65 20 66 69 6c 65 20 69 73 20 6a 75 73 74 20 |he file is just | 00011670 6e 6f 74 20 54 79 70 65 27 64 20 63 6f 72 72 65 |not Type'd corre| 00011680 63 74 6c 79 2e 20 20 28 43 6f 75 6c 64 20 62 65 |ctly. (Could be| 00011690 20 74 68 61 74 20 69 74 20 77 61 73 20 73 61 76 | that it was sav| 000116a0 65 64 20 75 6e 64 65 72 20 74 68 65 20 43 46 53 |ed under the CFS| 000116b0 20 6f 72 20 73 6f 6d 65 20 73 75 63 68 2c 20 61 | or some such, a| 000116c0 6e 64 20 79 6f 75 20 6f 6e 6c 79 20 67 61 76 65 |nd you only gave| 000116d0 20 74 68 65 20 53 43 53 49 46 53 3f 29 0a 0a 0a | the SCSIFS?)...| 000116e0 0a 09 31 33 09 46 69 6c 65 20 25 73 20 69 73 20 |..13.File %s is | 000116f0 74 6f 6f 20 73 6d 61 6c 6c 20 74 6f 20 62 65 20 |too small to be | 00011700 61 20 42 61 73 69 63 20 74 79 70 65 0a 0a 41 20 |a Basic type..A | 00011710 72 75 64 69 6d 65 6e 74 61 72 79 20 63 68 65 63 |rudimentary chec| 00011720 6b 20 6f 6e 20 65 61 63 68 20 42 61 73 69 63 20 |k on each Basic | 00011730 66 69 6c 65 20 69 73 20 64 6f 6e 65 20 2d 20 74 |file is done - t| 00011740 68 69 73 20 69 73 20 67 65 6e 65 72 61 74 65 64 |his is generated| 00011750 20 69 66 20 69 74 20 66 61 69 6c 73 2e 0a 0a 0a | if it fails....| 00011760 0a 09 31 34 09 46 69 6c 65 20 69 73 20 63 6f 72 |..14.File is cor| 00011770 72 75 70 74 65 64 2f 6e 6f 74 20 62 61 73 69 63 |rupted/not basic| 00011780 0a 0a 45 61 63 68 20 6c 69 6e 65 20 6f 66 20 74 |..Each line of t| 00011790 6f 6b 65 6e 69 73 65 64 20 42 61 73 69 63 20 68 |okenised Basic h| 000117a0 61 73 20 61 20 68 65 61 64 65 72 2e 20 20 41 73 |as a header. As| 000117b0 20 74 68 65 20 66 69 6c 65 20 69 73 20 70 61 72 | the file is par| 000117c0 73 65 64 20 65 61 63 68 20 68 65 61 64 65 72 20 |sed each header | 000117d0 69 73 20 63 68 65 63 6b 65 64 20 61 6e 64 20 69 |is checked and i| 000117e0 66 20 69 6e 76 61 6c 69 64 20 74 68 69 73 20 65 |f invalid this e| 000117f0 72 72 6f 72 20 69 73 20 67 65 6e 65 72 61 74 65 |rror is generate| 00011800 64 20 61 6e 64 20 70 61 72 73 69 6e 67 20 6f 66 |d and parsing of| 00011810 20 74 68 65 20 66 69 6c 65 20 69 73 20 61 62 6f | the file is abo| 00011820 72 74 65 64 2e 0a 0a 0a 0a 09 31 35 09 45 73 63 |rted......15.Esc| 00011830 61 70 65 20 70 72 65 73 73 65 64 2c 20 78 72 65 |ape pressed, xre| 00011840 66 20 61 62 6f 72 74 65 64 0a 0a 4e 6f 74 20 67 |f aborted..Not g| 00011850 65 6e 65 72 61 74 65 64 2e 20 20 45 73 63 61 70 |enerated. Escap| 00011860 65 73 20 6a 75 73 74 20 74 65 72 6d 69 6e 61 74 |es just terminat| 00011870 65 20 70 72 6f 67 72 61 6d 20 69 6d 6d 65 64 69 |e program immedi| 00011880 61 74 65 6c 79 20 69 6e 20 74 68 65 20 63 75 72 |ately in the cur| 00011890 72 65 6e 74 20 76 65 72 73 69 6f 6e 2e 0a 0a 0a |rent version....| 000118a0 0a 09 31 36 09 45 73 63 61 70 65 20 70 72 65 73 |..16.Escape pres| 000118b0 73 65 64 2c 20 63 6f 6d 70 72 65 73 73 69 6f 6e |sed, compression| 000118c0 20 61 62 6f 72 74 65 64 0a 0a 4e 6f 74 20 67 65 | aborted..Not ge| 000118d0 6e 65 72 61 74 65 64 2e 20 20 45 73 63 61 70 65 |nerated. Escape| 000118e0 73 20 6a 75 73 74 20 74 65 72 6d 69 6e 61 74 65 |s just terminate| 000118f0 20 70 72 6f 67 72 61 6d 20 69 6d 6d 65 64 69 61 | program immedia| 00011900 74 65 6c 79 20 69 6e 20 74 68 65 20 63 75 72 72 |tely in the curr| 00011910 65 6e 74 20 76 65 72 73 69 6f 6e 2e 0a 0a 0a 0a |ent version.....| 00011920 09 31 37 09 55 6e 65 78 70 65 63 74 65 64 20 25 |.17.Unexpected %| 00011930 73 20 69 6e 20 61 20 25 73 20 73 74 72 75 63 74 |s in a %s struct| 00011940 75 72 65 0a 0a 54 68 69 73 20 64 65 74 65 63 74 |ure..This detect| 00011950 73 20 61 6e 79 20 66 6f 75 6c 2d 75 70 73 20 69 |s any foul-ups i| 00011960 6e 20 6d 75 6c 74 69 2d 6c 69 6e 65 64 20 73 74 |n multi-lined st| 00011970 72 75 63 74 75 72 65 73 2e 20 20 54 68 65 20 42 |ructures. The B| 00011980 61 73 69 63 20 69 6e 74 65 72 70 72 65 74 65 72 |asic interpreter| 00011990 20 61 6c 6c 6f 77 73 20 73 6f 6d 65 20 6f 66 20 | allows some of | 000119a0 74 68 65 73 65 20 74 68 72 6f 75 67 68 20 77 69 |these through wi| 000119b0 74 68 6f 75 74 20 72 65 70 6f 72 74 69 6e 67 20 |thout reporting | 000119c0 61 6e 20 65 72 72 6f 72 2e 20 20 54 68 65 73 65 |an error. These| 000119d0 20 65 72 72 6f 72 73 20 61 6c 6c 6f 77 20 79 6f | errors allow yo| 000119e0 75 20 74 6f 20 66 69 78 20 74 68 65 20 28 76 65 |u to fix the (ve| 000119f0 72 79 20 70 72 6f 62 61 62 6c 79 29 20 6d 69 73 |ry probably) mis| 00011a00 74 61 6b 65 73 2e 20 20 53 65 65 20 77 61 72 6e |takes. See warn| 00011a10 69 6e 67 20 31 38 2e 0a 0a 0a 0a 09 31 38 09 55 |ing 18......18.U| 00011a20 6e 65 78 70 65 63 74 65 64 20 25 73 0a 0a 41 73 |nexpected %s..As| 00011a30 20 65 72 72 6f 72 20 31 37 20 61 62 6f 76 65 2c | error 17 above,| 00011a40 20 62 75 74 20 6f 62 76 69 6f 75 73 6c 79 20 6f | but obviously o| 00011a50 75 74 73 69 64 65 20 61 6e 79 20 73 75 72 72 6f |utside any surro| 00011a60 75 6e 64 69 6e 67 20 73 74 72 75 63 74 75 72 65 |unding structure| 00011a70 2e 0a 0a 0a 0a 09 31 39 09 45 6e 64 20 6f 66 20 |......19.End of | 00011a80 66 69 6c 65 20 69 6e 20 6d 69 64 64 6c 65 20 6f |file in middle o| 00011a90 66 20 61 73 73 65 6d 62 6c 65 72 0a 0a 41 20 73 |f assembler..A s| 00011aa0 70 65 63 69 61 6c 20 63 61 73 65 20 6f 66 20 65 |pecial case of e| 00011ab0 72 72 6f 72 20 36 2c 20 69 2e 65 2e 20 61 20 72 |rror 6, i.e. a r| 00011ac0 6f 75 74 69 6e 65 20 64 69 64 20 6e 6f 74 20 65 |outine did not e| 00011ad0 6e 64 20 62 65 66 6f 72 65 20 74 68 65 20 65 6e |nd before the en| 00011ae0 64 20 6f 66 20 61 20 66 69 6c 65 20 77 61 73 20 |d of a file was | 00011af0 66 6f 75 6e 64 2e 0a 0a 0a 0a 09 32 30 09 4f 54 |found......20.OT| 00011b00 48 45 52 57 49 53 45 20 6e 6f 74 20 61 74 20 73 |HERWISE not at s| 00011b10 74 61 72 74 20 6f 66 20 6c 69 6e 65 0a 0a 41 20 |tart of line..A | 00011b20 73 69 6d 70 6c 65 20 65 72 72 6f 72 20 66 6f 72 |simple error for| 00011b30 20 61 20 73 69 6d 70 6c 65 20 6d 69 73 74 61 6b | a simple mistak| 00011b40 65 2e 0a 0a 0a 0a 09 32 31 09 57 48 45 4e 20 6e |e......21.WHEN n| 00011b50 6f 74 20 61 74 20 73 74 61 72 74 20 6f 66 20 6c |ot at start of l| 00011b60 69 6e 65 0a 0a 41 20 73 69 6d 70 6c 65 20 65 72 |ine..A simple er| 00011b70 72 6f 72 20 66 6f 72 20 61 20 73 69 6d 70 6c 65 |ror for a simple| 00011b80 20 6d 69 73 74 61 6b 65 2e 0a 0a 09 32 32 09 43 | mistake....22.C| 00011b90 6f 6d 70 75 74 65 64 20 47 4f 54 4f 2f 47 4f 53 |omputed GOTO/GOS| 00011ba0 55 42 20 66 6f 75 6e 64 0a 0a 4e 6f 77 2c 20 49 |UB found..Now, I| 00011bb0 20 61 73 6b 20 79 6f 75 2c 20 69 73 20 74 68 69 | ask you, is thi| 00011bc0 73 20 68 6f 77 20 74 6f 20 70 72 6f 67 72 61 6d |s how to program| 00011bd0 3f 20 20 42 61 73 43 6f 6d 70 72 65 73 73 20 77 |? BasCompress w| 00011be0 69 6c 6c 20 72 65 66 75 73 65 20 74 6f 20 77 6f |ill refuse to wo| 00011bf0 72 6b 20 77 69 74 68 20 73 75 63 68 20 74 68 69 |rk with such thi| 00011c00 6e 67 73 2c 20 61 6e 64 20 77 68 6f 20 63 61 6e |ngs, and who can| 00011c10 20 62 6c 61 6d 65 20 69 74 3f 0a 0a 0a 0a 09 32 | blame it?.....2| 00011c20 33 09 49 4e 53 54 41 4c 4c 2f 4c 49 42 52 41 52 |3.INSTALL/LIBRAR| 00011c30 59 20 6e 6f 74 20 61 74 20 73 74 61 72 74 20 6f |Y not at start o| 00011c40 66 20 6c 69 6e 65 0a 0a 54 68 69 73 20 69 6e 64 |f line..This ind| 00011c50 69 63 61 74 65 73 20 61 20 73 79 6e 74 61 78 20 |icates a syntax | 00011c60 65 72 72 6f 72 2c 20 70 72 6f 62 61 62 6c 79 2e |error, probably.| 00011c70 20 20 4f 72 20 6d 61 79 62 65 20 61 6e 20 49 46 | Or maybe an IF| 00011c80 20 77 69 74 68 6f 75 74 20 61 20 54 48 45 4e 2c | without a THEN,| 00011c90 20 77 68 6f 20 6b 6e 6f 77 73 3f 0a 0a 0a 0a 09 | who knows?.....| 00011ca0 32 34 09 49 4e 53 54 41 4c 4c 2f 4c 49 42 52 41 |24.INSTALL/LIBRA| 00011cb0 52 59 20 63 61 6e 20 6e 6f 74 20 62 65 20 6f 6e |RY can not be on| 00011cc0 20 61 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 20 6c | a conditional l| 00011cd0 69 6e 65 0a 0a 49 66 20 79 6f 75 20 6d 75 73 74 |ine..If you must| 00011ce0 2c 20 74 68 65 6e 20 73 70 6c 69 74 20 69 6e 74 |, then split int| 00011cf0 6f 20 61 20 6d 75 6c 74 69 2d 6c 69 6e 65 20 49 |o a multi-line I| 00011d00 46 20 61 6e 64 20 74 72 79 20 61 67 61 69 6e 2e |F and try again.| 00011d10 0a 0a 0a 0a 09 32 35 09 54 68 65 20 73 70 65 63 |.....25.The spec| 00011d20 69 61 6c 20 72 6f 75 74 69 6e 65 20 90 25 73 91 |ial routine .%s.| 00011d30 20 77 61 73 20 64 65 63 6c 61 72 65 64 20 61 73 | was declared as| 00011d40 20 68 61 76 69 6e 67 20 64 69 66 66 65 72 65 6e | having differen| 00011d50 74 20 70 61 72 61 6d 65 74 65 72 73 20 66 72 6f |t parameters fro| 00011d60 6d 20 74 68 6f 73 65 20 66 6f 75 6e 64 20 68 65 |m those found he| 00011d70 72 65 0a 0a 54 68 65 20 6e 75 6d 62 65 72 20 6f |re..The number o| 00011d80 66 20 70 61 72 61 6d 65 74 65 72 73 20 64 6f 20 |f parameters do | 00011d90 6e 6f 74 20 6d 61 74 63 68 20 2d 20 70 72 6f 62 |not match - prob| 00011da0 61 62 6c 79 20 61 20 77 72 6f 6e 67 20 6e 75 6d |ably a wrong num| 00011db0 62 65 72 20 6f 66 20 63 6f 6d 6d 61 73 20 69 6e |ber of commas in| 00011dc0 20 74 68 65 20 53 70 65 63 69 61 6c 20 66 69 6c | the Special fil| 00011dd0 65 2e 0a 0a 0a 0a 09 32 36 09 54 68 65 20 73 70 |e......26.The sp| 00011de0 65 63 69 61 6c 20 72 6f 75 74 69 6e 65 20 90 25 |ecial routine .%| 00011df0 73 91 20 77 61 6e 74 73 20 61 20 73 74 72 69 6e |s. wants a strin| 00011e00 67 20 63 6f 6e 73 74 61 6e 74 20 66 6f 72 20 6f |g constant for o| 00011e10 6e 65 20 6f 66 20 69 74 73 27 20 70 61 72 61 6d |ne of its' param| 00011e20 65 74 65 72 73 0a 0a 54 68 69 73 20 70 72 6f 67 |eters..This prog| 00011e30 72 61 6d 20 6f 6e 6c 79 20 68 61 6e 64 6c 65 73 |ram only handles| 00011e40 20 76 65 72 79 20 73 69 6d 70 6c 65 20 63 6f 6e | very simple con| 00011e50 73 74 61 6e 74 20 73 74 72 69 6e 67 20 65 78 70 |stant string exp| 00011e60 72 65 73 73 69 6f 6e 73 2c 20 61 6e 64 20 74 68 |ressions, and th| 00011e70 69 73 20 65 72 72 6f 72 20 69 6e 64 69 63 61 74 |is error indicat| 00011e80 65 73 20 74 68 61 74 20 74 68 65 20 65 78 70 72 |es that the expr| 00011e90 65 73 73 69 6f 6e 20 77 61 73 20 6e 6f 74 20 73 |ession was not s| 00011ea0 69 6d 70 6c 65 20 65 6e 6f 75 67 68 2e 0a 0a 0a |imple enough....| 00011eb0 0a 09 32 37 09 4c 69 6e 65 20 74 6f 6f 20 6c 6f |..27.Line too lo| 00011ec0 6e 67 20 28 6d 61 78 20 32 35 36 29 0a 0a 54 68 |ng (max 256)..Th| 00011ed0 69 73 20 73 65 65 6d 73 20 61 20 72 65 61 73 6f |is seems a reaso| 00011ee0 6e 61 62 6c 65 20 75 70 70 65 72 20 6c 69 6d 69 |nable upper limi| 00011ef0 74 20 6f 6e 20 74 68 65 20 6c 69 6e 65 20 6c 65 |t on the line le| 00011f00 6e 67 74 68 20 6f 66 20 61 20 53 70 65 63 69 61 |ngth of a Specia| 00011f10 6c 20 66 69 6c 65 2e 0a 0a 0a 0a 09 32 38 09 4c |l file......28.L| 00011f20 69 6e 65 20 90 25 73 91 20 69 73 20 6e 6f 74 20 |ine .%s. is not | 00011f30 6f 66 20 61 20 72 65 63 6f 67 6e 69 73 65 64 20 |of a recognised | 00011f40 66 6f 72 6d 0a 0a 53 79 6e 74 61 78 20 65 72 72 |form..Syntax err| 00011f50 6f 72 20 66 6f 72 20 74 68 65 20 53 70 65 63 69 |or for the Speci| 00011f60 61 6c 20 66 69 6c 65 20 6c 69 6e 65 2e 20 20 4e |al file line. N| 00011f70 6f 74 65 20 74 68 61 74 20 69 66 20 79 6f 75 20 |ote that if you | 00011f80 73 70 65 63 69 66 69 65 64 20 61 20 54 65 78 74 |specified a Text| 00011f90 20 66 69 6c 65 20 66 75 6c 6c 20 6f 66 20 63 6f | file full of co| 00011fa0 6e 74 72 6f 6c 20 63 6f 64 65 73 20 61 6e 64 20 |ntrol codes and | 00011fb0 73 75 63 68 2c 20 74 68 65 6e 20 79 6f 75 20 6d |such, then you m| 00011fc0 61 79 20 6f 6e 6c 79 20 67 65 74 20 74 6f 20 72 |ay only get to r| 00011fd0 65 61 64 20 74 68 65 20 6c 61 73 74 20 66 65 77 |ead the last few| 00011fe0 20 77 6f 72 64 73 20 6f 66 20 74 68 69 73 20 6d | words of this m| 00011ff0 65 73 73 61 67 65 2e 0a 0a 09 32 39 09 4c 61 62 |essage....29.Lab| 00012000 65 6c 20 90 25 73 91 20 69 73 20 69 6e 76 61 6c |el .%s. is inval| 00012010 69 64 0a 0a 49 6e 20 53 70 65 63 69 61 6c 20 66 |id..In Special f| 00012020 69 6c 65 73 2c 20 74 68 65 20 6c 61 62 65 6c 20 |iles, the label | 00012030 70 72 6f 62 61 62 6c 79 20 73 74 61 72 74 73 20 |probably starts | 00012040 77 69 74 68 20 61 20 64 69 67 69 74 2c 20 6f 72 |with a digit, or| 00012050 20 73 6f 6d 65 20 73 75 63 68 2e 0a 0a 0a 0a 09 | some such......| 00012060 33 30 09 50 61 72 61 6d 65 74 65 72 20 6c 69 73 |30.Parameter lis| 00012070 74 20 90 25 73 91 20 69 73 20 69 6e 76 61 6c 69 |t .%s. is invali| 00012080 64 0a 0a 49 6e 20 53 70 65 63 69 61 6c 20 66 69 |d..In Special fi| 00012090 6c 65 73 3a 20 77 68 61 74 20 6d 6f 72 65 20 6e |les: what more n| 000120a0 65 65 64 73 20 74 6f 20 62 65 20 73 61 69 64 3f |eeds to be said?| 000120b0 0a 0a 0a 0a 09 33 31 09 50 61 72 61 6d 65 74 65 |.....31.Paramete| 000120c0 72 20 6c 69 73 74 20 90 25 73 91 20 63 6f 6e 74 |r list .%s. cont| 000120d0 61 69 6e 73 20 61 20 64 75 70 6c 69 63 61 74 65 |ains a duplicate| 000120e0 0a 0a 49 6e 20 53 70 65 63 69 61 6c 20 66 69 6c |..In Special fil| 000120f0 65 73 3a 20 69 74 20 69 73 20 6e 6f 74 20 65 78 |es: it is not ex| 00012100 61 63 74 6c 79 20 6d 65 61 6e 69 6e 67 66 75 6c |actly meaningful| 00012110 20 74 6f 20 68 61 76 65 20 74 77 6f 20 6f 72 20 | to have two or | 00012120 6d 6f 72 65 20 70 61 72 61 6d 65 74 65 72 73 20 |more parameters | 00012130 61 73 73 69 67 6e 65 64 20 74 6f 20 74 68 65 20 |assigned to the | 00012140 73 61 6d 65 20 65 78 70 61 6e 73 69 6f 6e 20 6e |same expansion n| 00012150 75 6d 62 65 72 20 69 73 20 69 74 3f 0a 0a 0a 0a |umber is it?....| 00012160 09 33 32 09 49 6d 70 6c 69 63 69 74 20 6c 61 62 |.32.Implicit lab| 00012170 65 6c 20 73 75 62 73 74 69 74 75 74 69 6f 6e 20 |el substitution | 00012180 6f 76 65 72 66 6c 6f 77 65 64 0a 0a 57 68 65 6e |overflowed..When| 00012190 20 61 20 63 61 6c 6c 20 74 6f 20 61 20 53 70 65 | a call to a Spe| 000121a0 63 69 61 6c 20 72 6f 75 74 69 6e 65 20 69 73 20 |cial routine is | 000121b0 66 6f 75 6e 64 2c 20 74 68 65 20 6c 61 62 65 6c |found, the label| 000121c0 20 74 65 6d 70 6c 61 74 65 73 20 67 65 74 20 65 | templates get e| 000121d0 78 70 61 6e 64 65 64 20 75 73 69 6e 67 20 74 68 |xpanded using th| 000121e0 65 20 61 63 74 75 61 6c 20 70 61 72 61 6d 65 74 |e actual paramet| 000121f0 65 72 73 20 70 61 73 73 65 64 2e 20 20 54 68 69 |ers passed. Thi| 00012200 73 20 65 72 72 6f 72 20 73 68 6f 77 73 20 42 61 |s error shows Ba| 00012210 73 43 6f 6d 70 72 65 73 73 20 63 68 65 63 6b 73 |sCompress checks| 00012220 20 66 6f 72 20 6f 76 65 72 66 6c 6f 77 20 69 6e | for overflow in| 00012230 20 69 74 73 27 20 69 6e 74 65 72 6e 61 6c 20 62 | its' internal b| 00012240 75 66 66 65 72 73 21 0a 0a 0a 0a 09 33 33 09 54 |uffers!.....33.T| 00012250 6f 6f 20 6d 61 6e 79 20 73 70 65 63 69 61 6c 20 |oo many special | 00012260 72 6f 75 74 69 6e 65 73 20 28 6d 61 78 20 32 35 |routines (max 25| 00012270 35 29 0a 0a 41 20 70 65 72 66 65 63 74 6c 79 20 |5)..A perfectly | 00012280 72 65 61 73 6f 6e 61 62 6c 65 20 6c 69 6d 69 74 |reasonable limit| 00012290 20 69 74 20 73 65 65 6d 73 2e 20 20 54 68 69 73 | it seems. This| 000122a0 20 63 6f 75 6c 64 20 65 61 73 69 6c 79 20 62 65 | could easily be| 000122b0 20 65 78 74 65 6e 64 65 64 2c 20 74 68 6f 75 67 | extended, thoug| 000122c0 68 2e 0a 0a 0a 0a 09 33 34 09 55 6e 61 62 6c 65 |h......34.Unable| 000122d0 20 74 6f 20 6c 6f 61 64 20 73 70 65 63 69 61 6c | to load special| 000122e0 20 66 69 6c 65 20 28 6e 6f 74 20 54 65 78 74 3f | file (not Text?| 000122f0 29 0a 0a 4f 72 20 6d 61 79 62 65 20 69 74 20 77 |)..Or maybe it w| 00012300 61 73 6e 27 74 20 66 6f 75 6e 64 2e 20 20 4f 6e |asn't found. On| 00012310 6c 79 20 54 65 78 74 20 66 69 6c 65 73 20 61 72 |ly Text files ar| 00012320 65 20 61 63 63 65 70 74 65 64 2e 0a 0a 0a 0a 09 |e accepted......| 00012330 33 35 09 53 57 49 20 6e 61 6d 65 20 6d 69 73 73 |35.SWI name miss| 00012340 69 6e 67 2c 20 6f 72 20 6e 6f 74 20 73 69 6d 70 |ing, or not simp| 00012350 6c 65 0a 0a 49 74 20 69 73 20 6e 6f 72 6d 61 6c |le..It is normal| 00012360 20 74 6f 20 6a 75 73 74 20 68 61 76 65 20 61 20 | to just have a | 00012370 73 74 72 69 6e 67 2c 20 76 61 72 69 61 62 6c 65 |string, variable| 00012380 2c 20 6f 72 20 6e 75 6d 62 65 72 20 69 6d 6d 65 |, or number imme| 00012390 64 69 61 74 65 6c 79 20 61 66 74 65 72 20 61 20 |diately after a | 000123a0 53 59 53 20 28 53 57 49 29 2e 20 20 54 68 69 73 |SYS (SWI). This| 000123b0 20 69 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 | indicates that | 000123c0 66 6f 75 6e 64 20 73 6f 6d 65 74 68 69 6e 67 20 |found something | 000123d0 65 6c 73 65 20 2d 20 77 68 69 63 68 20 6d 61 79 |else - which may| 000123e0 20 69 6e 64 69 63 61 74 65 20 61 6e 20 65 72 72 | indicate an err| 000123f0 6f 72 2e 0a 0a 0a 0a 09 33 36 09 49 6c 6c 65 67 |or......36.Illeg| 00012400 61 6c 20 73 63 72 65 65 6e 20 6d 6f 64 65 0a 0a |al screen mode..| 00012410 49 66 20 74 68 65 20 6c 69 73 74 69 6e 67 20 6d |If the listing m| 00012420 6f 64 65 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 |ode could not be| 00012430 20 66 6f 75 6e 64 2c 20 61 6e 64 20 6e 6f 20 73 | found, and no s| 00012440 75 69 74 61 62 6c 65 20 61 6c 74 65 72 6e 61 74 |uitable alternat| 00012450 69 76 65 20 77 61 73 20 70 6f 73 73 69 62 6c 65 |ive was possible| 00012460 2c 20 74 68 65 6e 20 74 68 69 73 20 65 72 72 6f |, then this erro| 00012470 72 20 69 73 20 67 65 6e 65 72 61 74 65 64 2e 0a |r is generated..| 00012480 0a 0a 0a 09 33 37 09 42 61 64 20 6d 61 69 6e 20 |....37.Bad main | 00012490 70 72 6f 67 72 61 6d 2c 20 75 6e 74 65 72 6d 69 |program, untermi| 000124a0 6e 61 74 65 64 20 25 73 20 73 74 72 75 63 74 75 |nated %s structu| 000124b0 72 65 0a 0a 54 68 69 73 20 69 73 20 61 20 73 70 |re..This is a sp| 000124c0 65 63 69 61 6c 20 63 61 73 65 2c 20 69 66 20 74 |ecial case, if t| 000124d0 68 65 20 66 69 72 73 74 20 72 6f 75 74 69 6e 65 |he first routine| 000124e0 20 66 6f 75 6e 64 20 28 44 45 46 a0 50 52 4f 43 | found (DEF.PROC| 000124f0 2c 20 6f 72 20 44 45 46 a0 46 4e 29 20 77 61 73 |, or DEF.FN) was| 00012500 20 69 6e 73 69 64 65 20 61 20 6d 75 6c 74 69 2d | inside a multi-| 00012510 6c 69 6e 65 20 73 74 72 75 63 74 75 72 65 2e 20 |line structure. | 00012520 20 54 68 69 73 20 69 6e 64 69 63 61 74 65 73 20 | This indicates | 00012530 61 6e 20 65 72 72 6f 72 20 69 6e 20 74 68 65 20 |an error in the | 00012540 6d 61 69 6e 20 70 72 6f 67 72 61 6d 2e 0a 0a 0a |main program....| 00012550 0a 09 33 38 09 43 61 6e 27 74 20 66 69 6e 64 20 |..38.Can't find | 00012560 63 6c 6f 73 69 6e 67 20 65 6c 6c 69 70 73 69 73 |closing ellipsis| 00012570 20 69 6e 20 73 70 65 63 69 61 6c 20 72 6f 75 74 | in special rout| 00012580 69 6e 65 20 70 61 72 61 6d 65 74 65 72 0a 0a 44 |ine parameter..D| 00012590 75 72 69 6e 67 20 6c 61 62 65 6c 20 65 78 70 61 |uring label expa| 000125a0 6e 73 69 6f 6e 2c 20 42 61 73 43 6f 6d 70 72 65 |nsion, BasCompre| 000125b0 73 73 20 66 6f 75 6e 64 20 61 20 6c 61 62 65 6c |ss found a label| 000125c0 20 65 6e 64 69 6e 67 20 69 6e 20 28 2c 20 77 68 | ending in (, wh| 000125d0 69 63 68 20 69 74 20 74 6f 6f 6b 20 74 6f 20 6d |ich it took to m| 000125e0 65 61 6e 20 74 68 65 20 73 74 61 72 74 20 6f 66 |ean the start of| 000125f0 20 61 6e 20 61 72 72 61 79 20 69 6e 64 65 78 2e | an array index.| 00012600 20 20 4e 6f 20 63 6c 6f 73 69 6e 67 20 29 20 77 | No closing ) w| 00012610 61 73 20 66 6f 75 6e 64 20 62 65 66 6f 72 65 20 |as found before | 00012620 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 73 |the end of the s| 00012630 74 72 69 6e 67 2e 0a 0a 0a 0a 09 33 39 09 42 61 |tring......39.Ba| 00012640 64 20 63 68 61 72 20 60 25 63 27 20 66 6f 6c 6c |d char `%c' foll| 00012650 6f 77 69 6e 67 20 3e 20 6f 72 20 3a 20 69 6e 20 |owing > or : in | 00012660 73 70 65 63 69 61 6c 20 72 6f 75 74 69 6e 65 20 |special routine | 00012670 70 61 72 61 6d 65 74 65 72 0a 0a 44 75 72 69 6e |parameter..Durin| 00012680 67 20 6c 61 62 65 6c 20 65 78 70 61 6e 73 69 6f |g label expansio| 00012690 6e 2c 20 42 61 73 43 6f 6d 70 72 65 73 73 20 65 |n, BasCompress e| 000126a0 78 70 65 63 74 73 20 74 68 65 20 6c 61 62 65 6c |xpects the label| 000126b0 20 74 6f 20 62 65 20 74 65 72 6d 69 6e 61 74 65 | to be terminate| 000126c0 64 20 62 79 20 61 20 63 6f 6d 6d 61 20 6f 72 20 |d by a comma or | 000126d0 74 68 65 20 45 4f 53 2e 20 20 54 68 69 73 20 69 |the EOS. This i| 000126e0 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 74 68 |ndicates that th| 000126f0 69 73 20 63 6f 6e 64 69 74 69 6f 6e 20 77 61 73 |is condition was| 00012700 20 6e 6f 74 20 73 61 74 69 73 66 69 65 64 2e 0a | not satisfied..| 00012710 0a 0a 0a 37 2e 34 20 52 75 6e 2d 74 69 6d 65 20 |...7.4 Run-time | 00012720 65 72 72 6f 72 73 0a 0a 48 65 72 65 20 69 73 20 |errors..Here is | 00012730 73 6f 6d 65 20 68 65 6c 70 20 77 69 74 68 20 70 |some help with p| 00012740 6f 73 73 69 62 6c 65 20 65 72 72 6f 72 73 20 74 |ossible errors t| 00012750 68 61 74 20 42 61 73 43 6f 6d 70 72 65 73 73 20 |hat BasCompress | 00012760 6d 61 79 20 69 6e 74 72 6f 64 75 63 65 20 74 6f |may introduce to| 00012770 20 74 68 65 20 63 6f 6d 70 72 65 73 73 65 64 20 | the compressed | 00012780 42 61 73 69 63 20 6f 75 74 70 75 74 2e 0a 0a 37 |Basic output...7| 00012790 2e 34 2e 31 20 55 6e 6b 6e 6f 77 6e 20 6f 72 20 |.4.1 Unknown or | 000127a0 6d 69 73 73 69 6e 67 20 76 61 72 69 61 62 6c 65 |missing variable| 000127b0 0a 0a 54 68 65 20 71 75 69 63 6b 20 61 6e 64 20 |..The quick and | 000127c0 65 61 73 79 20 6d 65 74 68 6f 64 20 74 6f 20 73 |easy method to s| 000127d0 6f 6c 76 65 20 74 68 69 73 20 70 72 6f 62 6c 65 |olve this proble| 000127e0 6d 20 69 73 20 74 6f 20 74 75 72 6e 20 6f 66 20 |m is to turn of | 000127f0 61 6c 6c 20 6c 61 62 65 6c 20 72 65 64 75 63 74 |all label reduct| 00012800 69 6f 6e 2e 20 20 54 68 69 73 20 69 73 20 6e 6f |ion. This is no| 00012810 74 20 72 65 63 6f 6d 6d 65 6e 64 2c 20 61 73 20 |t recommend, as | 00012820 69 74 20 6d 61 6b 65 73 20 74 68 65 20 75 73 65 |it makes the use| 00012830 20 6f 66 20 42 61 73 43 6f 6d 70 72 65 73 73 20 | of BasCompress | 00012840 61 6c 6d 6f 73 74 20 77 6f 72 74 68 6c 65 73 73 |almost worthless| 00012850 2e 0a 0a 54 68 69 73 20 65 72 72 6f 72 20 68 61 |...This error ha| 00012860 73 20 62 65 65 6e 20 67 65 6e 65 72 61 74 65 64 |s been generated| 00012870 20 62 65 63 61 75 73 65 20 79 6f 75 20 68 61 76 | because you hav| 00012880 65 20 6e 6f 74 20 74 6f 6c 64 20 42 61 73 43 6f |e not told BasCo| 00012890 6d 70 72 65 73 73 20 61 62 6f 75 74 20 74 68 65 |mpress about the| 000128a0 20 73 69 64 65 20 65 66 66 65 63 74 73 20 6f 66 | side effects of| 000128b0 20 61 6e 20 45 56 41 4c 20 6f 72 20 44 41 54 41 | an EVAL or DATA| 000128c0 20 73 74 61 74 65 6d 65 6e 74 73 2e 20 20 53 65 | statements. Se| 000128d0 65 20 a7 32 2e 31 31 20 66 6f 72 20 77 68 79 20 |e .2.11 for why | 000128e0 74 68 69 73 20 70 72 6f 64 75 63 65 73 20 74 68 |this produces th| 000128f0 65 20 65 72 72 6f 72 2c 20 61 6e 64 20 a7 36 20 |e error, and .6 | 00012900 66 6f 72 20 68 6f 77 20 74 6f 20 63 75 72 65 20 |for how to cure | 00012910 69 74 2e 0a 0a 49 6e 20 65 73 73 65 6e 63 65 20 |it...In essence | 00012920 79 6f 75 20 68 61 76 65 20 74 6f 20 67 6f 20 74 |you have to go t| 00012930 68 72 6f 75 67 68 20 74 68 65 20 70 72 6f 67 72 |hrough the progr| 00012940 61 6d 2c 20 6c 6f 63 61 74 65 20 74 68 65 20 45 |am, locate the E| 00012950 56 41 4c 27 73 20 61 6e 64 20 70 6f 73 73 69 62 |VAL's and possib| 00012960 6c 79 20 74 68 65 20 44 41 54 41 20 73 74 61 74 |ly the DATA stat| 00012970 65 6d 65 6e 74 73 20 61 73 20 77 65 6c 6c 2c 20 |ements as well, | 00012980 28 6c 6f 6f 6b 20 69 6e 20 74 68 65 20 6c 6f 67 |(look in the log| 00012990 20 66 69 6c 65 20 66 6f 72 20 65 78 61 63 74 6c | file for exactl| 000129a0 79 20 77 68 65 72 65 20 74 6f 20 66 69 6e 64 20 |y where to find | 000129b0 74 68 65 73 65 29 2c 20 61 6e 64 20 74 68 65 6e |these), and then| 000129c0 20 62 75 69 6c 64 20 61 20 53 70 65 63 69 61 6c | build a Special| 000129d0 20 66 69 6c 65 20 74 6f 20 74 65 6c 6c 20 42 61 | file to tell Ba| 000129e0 73 43 6f 6d 70 72 65 73 73 20 68 6f 77 20 74 6f |sCompress how to| 000129f0 20 68 61 6e 64 6c 65 20 74 68 65 73 65 2e 0a 0a | handle these...| 00012a00 55 73 75 61 6c 6c 79 20 74 68 69 73 20 65 6e 74 |Usually this ent| 00012a10 61 69 6c 73 20 64 65 66 69 6e 69 6e 67 20 73 6f |ails defining so| 00012a20 6d 65 20 94 67 6c 6f 62 61 6c 95 20 6c 61 62 65 |me .global. labe| 00012a30 6c 73 20 74 68 61 74 20 77 69 6c 6c 20 6e 65 76 |ls that will nev| 00012a40 65 72 20 62 65 20 72 65 64 75 63 65 64 2c 20 61 |er be reduced, a| 00012a50 6c 74 68 6f 75 67 68 20 73 6f 6d 65 74 69 6d 65 |lthough sometime| 00012a60 73 20 69 74 20 69 73 20 70 6f 73 73 69 62 6c 65 |s it is possible| 00012a70 20 74 6f 20 62 75 69 6c 64 20 61 20 6d 6f 72 65 | to build a more| 00012a80 20 73 6f 70 68 69 73 74 69 63 61 74 65 64 20 70 | sophisticated p| 00012a90 61 72 61 6d 65 74 65 72 2d 62 61 73 65 64 20 72 |arameter-based r| 00012aa0 75 6c 65 2e 0a 0a 49 74 20 6d 61 79 20 6a 75 73 |ule...It may jus| 00012ab0 74 20 62 65 20 70 6f 73 73 69 62 6c 65 20 74 68 |t be possible th| 00012ac0 61 74 20 74 68 69 73 20 65 72 72 6f 72 20 69 73 |at this error is| 00012ad0 20 67 65 6e 65 72 61 74 65 64 20 69 6e 73 69 64 | generated insid| 00012ae0 65 20 61 73 73 65 6d 62 6c 65 72 2e 20 20 49 66 |e assembler. If| 00012af0 20 73 6f 2c 20 74 68 65 6e 20 74 68 69 73 20 69 | so, then this i| 00012b00 6e 64 69 63 61 74 65 73 20 61 6e 20 65 72 72 6f |ndicates an erro| 00012b10 72 20 6f 6e 20 42 61 73 43 6f 6d 70 72 65 73 73 |r on BasCompress| 00012b20 27 20 70 61 72 74 2e 20 20 45 78 61 6d 70 6c 65 |' part. Example| 00012b30 73 20 6f 66 20 73 75 63 68 20 73 68 6f 75 6c 64 |s of such should| 00012b40 20 62 65 20 73 65 6e 74 20 74 6f 20 74 68 65 20 | be sent to the | 00012b50 61 75 74 68 6f 72 20 66 6f 72 20 69 6e 63 6c 75 |author for inclu| 00012b60 73 69 6f 6e 20 69 6e 20 75 70 67 72 61 64 65 73 |sion in upgrades| 00012b70 2e 20 20 54 68 69 73 20 70 6f 73 73 69 62 69 6c |. This possibil| 00012b80 69 74 79 20 69 73 20 65 78 74 72 65 6d 65 6c 79 |ity is extremely| 00012b90 20 72 65 6d 6f 74 65 20 61 73 20 42 61 73 43 6f | remote as BasCo| 00012ba0 6d 70 72 65 73 73 20 68 61 73 20 62 65 65 6e 20 |mpress has been | 00012bb0 74 65 73 74 65 64 20 77 69 74 68 20 61 20 77 69 |tested with a wi| 00012bc0 64 65 20 72 61 6e 67 65 20 6f 66 20 73 6f 75 72 |de range of sour| 00012bd0 63 65 73 2c 20 62 75 74 20 6d 6f 73 74 20 63 61 |ces, but most ca| 00012be0 73 65 73 20 77 68 65 72 65 20 69 74 20 68 61 73 |ses where it has| 00012bf0 20 66 61 69 6c 65 64 20 69 6e 20 74 68 65 20 70 | failed in the p| 00012c00 61 73 74 20 68 61 73 20 62 65 65 6e 20 69 6e 20 |ast has been in | 00012c10 74 68 69 73 20 61 72 65 61 2e 0a 0a 37 2e 34 2e |this area...7.4.| 00012c20 32 20 4e 6f 20 73 75 63 68 20 66 75 6e 63 74 69 |2 No such functi| 00012c30 6f 6e 2f 70 72 6f 63 65 64 75 72 65 0a 0a 54 68 |on/procedure..Th| 00012c40 69 73 20 6f 63 63 75 72 73 20 66 6f 72 20 65 78 |is occurs for ex| 00012c50 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20 72 |actly the same r| 00012c60 65 61 73 6f 6e 73 20 61 73 20 64 65 74 61 69 6c |easons as detail| 00012c70 65 64 20 69 6e 20 a7 37 2e 34 2e 31 20 61 62 6f |ed in .7.4.1 abo| 00012c80 76 65 2e 0a 0a 37 2e 34 2e 33 20 4d 69 73 73 69 |ve...7.4.3 Missi| 00012c90 6e 67 20 45 4e 44 49 46 0a 0a 54 68 65 73 65 20 |ng ENDIF..These | 00012ca0 65 72 72 6f 72 73 20 61 72 65 20 67 65 6e 65 72 |errors are gener| 00012cb0 61 74 65 64 20 76 65 72 79 20 72 61 72 65 6c 79 |ated very rarely| 00012cc0 2c 20 62 75 74 20 74 68 65 79 20 61 72 65 20 6a |, but they are j| 00012cd0 75 73 74 20 70 6f 73 73 69 62 6c 65 2e 20 20 43 |ust possible. C| 00012ce0 6f 6e 73 69 64 65 72 20 74 68 65 20 66 6f 6c 6c |onsider the foll| 00012cf0 6f 77 69 6e 67 20 63 6f 64 65 3a 0a 0a 09 49 46 |owing code:...IF| 00012d00 20 46 4e 5f 53 61 76 65 46 69 6c 65 20 54 48 45 | FN_SaveFile THE| 00012d10 4e 20 3a 3a 3a 52 45 4d 20 63 6f 6d 6d 65 6e 74 |N :::REM comment| 00012d20 0a 0a 57 68 61 74 20 42 61 73 43 6f 6d 70 72 65 |..What BasCompre| 00012d30 73 73 20 63 6f 75 6c 64 20 70 72 6f 64 75 63 65 |ss could produce| 00012d40 2c 20 61 6c 74 68 6f 75 67 68 20 69 74 20 64 6f |, although it do| 00012d50 65 73 20 74 72 69 65 73 20 6e 6f 74 20 74 6f 2c |es tries not to,| 00012d60 20 69 73 3a 0a 0a 09 49 46 46 4e 78 54 48 45 4e | is:...IFFNxTHEN| 00012d70 0a 0a 4f 62 76 69 6f 75 73 6c 79 20 74 68 69 73 |..Obviously this| 00012d80 20 69 73 20 77 72 6f 6e 67 2c 20 77 72 6f 6e 67 | is wrong, wrong| 00012d90 2c 20 77 72 6f 6e 67 2e 20 20 46 72 6f 6d 20 61 |, wrong. From a| 00012da0 20 73 69 6d 70 6c 65 20 6f 6e 65 2d 6c 69 6e 65 | simple one-line| 00012db0 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 20 28 74 68 | conditional (th| 00012dc0 61 74 20 64 6f 65 73 20 6e 6f 74 68 69 6e 67 29 |at does nothing)| 00012dd0 2c 20 42 61 73 43 6f 6d 70 72 65 73 73 20 68 61 |, BasCompress ha| 00012de0 73 20 70 72 6f 64 75 63 65 64 20 61 20 6d 75 6c |s produced a mul| 00012df0 74 69 2d 6c 69 6e 65 20 63 6f 6e 64 69 74 69 6f |ti-line conditio| 00012e00 6e 61 6c 20 63 6f 6e 73 74 72 75 63 74 20 77 68 |nal construct wh| 00012e10 65 72 65 20 74 68 65 72 65 20 73 68 6f 75 6c 64 |ere there should| 00012e20 6e 27 74 20 62 65 20 61 6e 79 2c 20 61 6e 64 20 |n't be any, and | 00012e30 77 69 74 68 6f 75 74 20 74 68 65 20 45 4e 44 49 |without the ENDI| 00012e40 46 2e 0a 0a 53 69 6e 63 65 20 74 68 69 73 20 73 |F...Since this s| 00012e50 69 74 75 61 74 69 6f 6e 20 69 73 20 66 61 69 72 |ituation is fair| 00012e60 6c 79 20 72 61 72 65 2c 20 61 6e 64 20 42 61 73 |ly rare, and Bas| 00012e70 43 6f 6d 70 72 65 73 73 20 64 6f 65 73 20 68 61 |Compress does ha| 00012e80 6e 64 6c 65 20 69 74 20 6d 6f 73 74 20 6f 66 20 |ndle it most of | 00012e90 74 68 65 20 74 69 6d 65 2c 20 69 74 20 69 73 20 |the time, it is | 00012ea0 6e 6f 74 20 6c 69 6b 65 6c 79 20 74 6f 20 62 65 |not likely to be| 00012eb0 20 72 65 6d 65 64 69 65 64 20 2d 20 75 6e 6c 65 | remedied - unle| 00012ec0 73 73 20 65 6e 6f 75 67 68 20 70 65 6f 70 6c 65 |ss enough people| 00012ed0 20 72 65 71 75 65 73 74 20 69 74 2e 0a 0a 54 68 | request it...Th| 00012ee0 65 20 77 6f 72 6b 20 61 72 6f 75 6e 64 20 69 73 |e work around is| 00012ef0 20 74 6f 20 6e 6f 74 20 74 6f 20 69 67 6e 6f 72 | to not to ignor| 00012f00 65 20 74 68 65 20 72 65 74 75 72 6e 20 76 61 6c |e the return val| 00012f10 75 65 20 66 72 6f 6d 20 74 68 65 20 66 75 6e 63 |ue from the func| 00012f20 74 69 6f 6e 2c 20 77 68 69 63 68 20 69 73 20 70 |tion, which is p| 00012f30 72 6f 62 61 62 6c 79 20 61 6e 20 65 72 72 6f 72 |robably an error| 00012f40 20 73 74 61 74 75 73 20 28 69 6e 64 69 63 61 74 | status (indicat| 00012f50 69 6e 67 20 61 20 76 65 72 79 20 6c 61 7a 79 20 |ing a very lazy | 00012f60 70 72 6f 67 72 61 6d 6d 65 72 21 29 2c 20 62 75 |programmer!), bu| 00012f70 74 20 74 6f 20 61 73 73 69 67 6e 20 69 74 20 74 |t to assign it t| 00012f80 6f 20 61 20 76 61 72 69 61 62 6c 65 2c 20 61 6e |o a variable, an| 00012f90 64 20 74 68 65 6e 20 61 63 74 20 6f 6e 20 69 74 |d then act on it| 00012fa0 20 61 63 63 6f 72 64 69 6e 67 6c 79 2e 0a 0a 37 | accordingly...7| 00012fb0 2e 34 2e 34 20 4c 6f 67 69 63 61 6c 20 65 72 72 |.4.4 Logical err| 00012fc0 6f 72 73 0a 0a 42 79 20 74 68 69 73 20 69 74 20 |ors..By this it | 00012fd0 69 73 20 6d 65 61 6e 74 20 74 68 61 74 20 61 20 |is meant that a | 00012fe0 70 72 6f 67 72 61 6d 20 64 6f 65 73 6e 27 74 20 |program doesn't | 00012ff0 67 65 6e 65 72 61 74 65 20 61 6e 79 20 6f 76 65 |generate any ove| 00013000 72 74 20 65 72 72 6f 72 73 2c 20 69 74 27 73 20 |rt errors, it's | 00013010 6a 75 73 74 20 74 68 61 74 20 69 74 20 64 6f 65 |just that it doe| 00013020 73 6e 27 74 20 64 6f 20 74 68 65 20 73 61 6d 65 |sn't do the same| 00013030 20 61 73 20 69 74 20 64 69 64 20 62 65 66 6f 72 | as it did befor| 00013040 65 20 63 6f 6d 70 72 65 73 73 69 6f 6e 2e 0a 0a |e compression...| 00013050 42 61 73 43 6f 6d 70 72 65 73 73 20 68 61 73 20 |BasCompress has | 00013060 62 65 65 6e 20 74 65 73 74 65 64 20 71 75 69 74 |been tested quit| 00013070 65 20 74 68 6f 72 6f 75 67 68 6c 79 20 77 69 74 |e thoroughly wit| 00013080 68 20 61 20 77 69 64 65 20 73 6f 75 72 63 65 20 |h a wide source | 00013090 6f 66 20 42 61 73 69 63 20 70 72 6f 67 72 61 6d |of Basic program| 000130a0 73 2c 20 61 6e 64 20 69 74 20 69 73 20 68 6f 70 |s, and it is hop| 000130b0 65 64 20 74 68 61 74 20 61 6c 6c 20 6f 66 20 74 |ed that all of t| 000130c0 68 65 73 65 20 65 78 63 65 70 74 69 6f 6e 61 6c |hese exceptional| 000130d0 20 63 61 73 65 73 20 68 61 76 65 20 62 65 65 6e | cases have been| 000130e0 20 6e 6f 74 65 64 20 61 6e 64 20 64 75 6c 79 20 | noted and duly | 000130f0 68 61 6e 64 6c 65 64 2e 20 20 48 6f 77 65 76 65 |handled. Howeve| 00013100 72 20 69 66 20 79 6f 75 20 64 6f 20 67 65 74 20 |r if you do get | 00013110 74 68 69 73 20 74 79 70 65 20 6f 66 20 65 72 72 |this type of err| 00013120 6f 72 2c 20 69 74 20 69 73 20 73 74 69 6c 6c 20 |or, it is still | 00013130 70 72 6f 62 61 62 6c 79 20 62 65 63 61 75 73 65 |probably because| 00013140 20 6f 66 20 45 56 41 4c 20 61 6e 64 20 44 41 54 | of EVAL and DAT| 00013150 41 20 62 65 69 6e 67 20 75 73 65 64 20 77 69 74 |A being used wit| 00013160 68 20 75 6e 64 65 63 6c 61 72 65 64 20 28 61 6e |h undeclared (an| 00013170 64 20 70 72 6f 62 61 62 6c 79 20 73 68 6f 72 74 |d probably short| 00013180 2c 20 65 2e 67 2e 20 41 25 2c 20 78 2c 20 65 74 |, e.g. A%, x, et| 00013190 63 2e 29 20 76 61 72 69 61 62 6c 65 73 2e 20 20 |c.) variables. | 000131a0 54 68 65 73 65 20 76 61 72 69 61 62 6c 65 73 20 |These variables | 000131b0 6d 61 79 20 68 61 76 65 20 62 65 65 6e 20 94 72 |may have been .r| 000131c0 65 6e 61 6d 65 64 95 20 62 79 20 42 61 73 43 6f |enamed. by BasCo| 000131d0 6d 70 72 65 73 73 2c 20 6f 72 20 65 76 65 6e 20 |mpress, or even | 000131e0 72 65 2d 6d 61 70 70 65 64 20 74 6f 20 64 69 66 |re-mapped to dif| 000131f0 66 65 72 65 6e 74 20 76 61 72 69 61 62 6c 65 73 |ferent variables| 00013200 2c 20 61 6e 64 20 68 65 6e 63 65 20 63 6f 6e 74 |, and hence cont| 00013210 61 69 6e 20 61 6e 20 69 6e 76 61 6c 69 64 20 76 |ain an invalid v| 00013220 61 6c 75 65 2e 0a 0a 49 66 20 69 74 20 69 73 20 |alue...If it is | 00013230 6e 6f 74 20 62 65 63 61 75 73 65 20 6f 66 20 74 |not because of t| 00013240 68 69 73 2c 20 74 68 65 6e 20 74 68 65 20 61 75 |his, then the au| 00013250 74 68 6f 72 20 77 6f 75 6c 64 20 61 70 70 72 65 |thor would appre| 00013260 63 69 61 74 65 20 69 74 20 69 66 20 61 6e 20 65 |ciate it if an e| 00013270 78 61 6d 70 6c 65 20 6f 66 20 74 68 65 20 69 6e |xample of the in| 00013280 63 6f 72 72 65 63 74 6c 79 20 63 6f 6d 70 72 65 |correctly compre| 00013290 73 73 65 64 20 73 6f 75 72 63 65 20 77 61 73 20 |ssed source was | 000132a0 73 65 6e 74 20 69 6e 2c 20 73 6f 20 42 61 73 43 |sent in, so BasC| 000132b0 6f 6d 70 72 65 73 73 20 63 6f 75 6c 64 20 62 65 |ompress could be| 000132c0 20 75 70 64 61 74 65 64 20 74 6f 20 68 61 6e 64 | updated to hand| 000132d0 6c 65 20 74 68 61 74 20 63 61 73 65 2e 0a 0a 37 |le that case...7| 000132e0 2e 35 20 49 6e 74 65 72 6e 61 6c 20 65 72 72 6f |.5 Internal erro| 000132f0 72 73 0a 0a 54 68 65 73 65 20 61 72 65 20 94 73 |rs..These are .s| 00013300 79 73 74 65 6d 95 20 65 72 72 6f 72 73 20 67 65 |ystem. errors ge| 00013310 6e 65 72 61 74 65 64 20 62 79 20 42 61 73 43 6f |nerated by BasCo| 00013320 6d 70 72 65 73 73 20 69 74 73 65 6c 66 2e 20 20 |mpress itself. | 00013330 54 68 65 73 65 20 6d 65 73 73 61 67 65 73 20 61 |These messages a| 00013340 72 65 20 68 61 72 64 2d 63 6f 64 65 64 20 69 6e |re hard-coded in| 00013350 74 6f 20 74 68 65 20 65 78 65 63 75 74 61 62 6c |to the executabl| 00013360 65 2c 20 61 6e 64 20 75 73 65 20 74 68 65 20 65 |e, and use the e| 00013370 72 72 6f 72 20 6e 75 6d 62 65 72 20 63 68 75 6e |rror number chun| 00013380 6b 20 26 44 43 42 43 30 20 74 6f 20 26 44 43 42 |k &DCBC0 to &DCB| 00013390 46 46 3a 0a 0a 09 09 45 72 72 6f 72 28 73 29 20 |FF:....Error(s) | 000133a0 64 75 72 69 6e 67 20 70 61 72 73 69 6e 67 0a 0a |during parsing..| 000133b0 54 68 69 73 20 73 68 6f 75 6c 64 20 6e 65 76 65 |This should neve| 000133c0 72 20 61 70 70 65 61 72 2c 20 61 73 20 69 74 20 |r appear, as it | 000133d0 69 73 20 61 6e 20 69 6e 74 65 72 6e 61 6c 20 65 |is an internal e| 000133e0 72 72 6f 72 20 75 73 65 64 20 74 6f 20 69 6e 64 |rror used to ind| 000133f0 69 63 61 74 65 20 61 6e 20 65 72 72 6f 6e 65 6f |icate an erroneo| 00013400 75 73 20 70 61 72 73 69 6e 67 20 73 74 61 67 65 |us parsing stage| 00013410 2e 0a 0a 0a 0a 09 09 49 6e 76 61 6c 69 64 20 73 |.......Invalid s| 00013420 6f 72 74 20 63 68 61 72 61 63 74 65 72 20 27 25 |ort character '%| 00013430 63 27 0a 0a 09 09 53 6f 72 74 20 73 74 72 69 6e |c'....Sort strin| 00013440 67 20 74 6f 6f 20 6c 6f 6e 67 0a 0a 09 09 49 6e |g too long....In| 00013450 76 61 6c 69 64 20 74 79 70 65 20 63 68 61 72 61 |valid type chara| 00013460 63 74 65 72 20 60 25 63 27 0a 0a 54 68 65 73 65 |cter `%c'..These| 00013470 20 69 6e 64 69 63 61 74 65 20 72 75 64 69 6d 65 | indicate rudime| 00013480 6e 74 61 72 79 20 65 72 72 6f 72 73 20 6f 6e 20 |ntary errors on | 00013490 74 68 65 20 70 61 72 61 6d 65 74 65 72 73 20 70 |the parameters p| 000134a0 61 73 73 65 64 20 6f 6e 20 74 68 65 20 43 4c 49 |assed on the CLI| 000134b0 2e 0a 0a 0a 0a 09 09 49 6e 76 61 6c 69 64 20 6f |.......Invalid o| 000134c0 70 74 69 6f 6e 20 69 6e 20 73 79 73 74 65 6d 20 |ption in system | 000134d0 76 61 72 69 61 62 6c 65 20 42 61 73 43 6f 6d 70 |variable BasComp| 000134e0 72 65 73 73 24 4f 70 74 69 6f 6e 73 0a 0a 49 6e |ress$Options..In| 000134f0 64 69 63 61 74 65 73 20 61 6e 20 69 6e 76 61 6c |dicates an inval| 00013500 69 64 20 73 79 73 74 65 6d 20 76 61 72 69 61 62 |id system variab| 00013510 6c 65 2e 20 20 55 6e 66 6f 72 74 75 6e 61 74 65 |le. Unfortunate| 00013520 6c 79 20 69 74 20 69 73 20 6e 6f 74 20 70 6f 73 |ly it is not pos| 00013530 73 69 62 6c 65 20 74 6f 20 73 68 6f 77 20 65 78 |sible to show ex| 00013540 61 63 74 6c 79 20 77 68 61 74 20 77 61 73 20 77 |actly what was w| 00013550 72 6f 6e 67 20 77 69 74 68 20 69 74 2c 20 6a 75 |rong with it, ju| 00013560 73 74 20 74 68 61 74 20 73 6f 6d 65 20 70 61 72 |st that some par| 00013570 74 20 6f 66 20 69 74 20 77 61 73 20 77 72 6f 6e |t of it was wron| 00013580 67 2e 0a 0a 0a 0a 09 09 31 2e 31 0a 0a 09 09 2e |g.......1.1.....| 00013590 2e 2e 0a 0a 09 09 31 30 2e 31 0a 0a 54 68 65 73 |......10.1..Thes| 000135a0 65 20 65 72 72 6f 72 73 20 73 68 6f 75 6c 64 20 |e errors should | 000135b0 6e 65 76 65 72 20 62 65 20 67 65 6e 65 72 61 74 |never be generat| 000135c0 65 64 2e 20 20 54 68 65 79 20 69 6e 64 69 63 61 |ed. They indica| 000135d0 74 65 20 77 68 65 72 65 20 42 61 73 43 6f 6d 70 |te where BasComp| 000135e0 72 65 73 73 20 68 61 73 20 66 6f 75 6e 64 20 73 |ress has found s| 000135f0 6f 6d 65 20 69 6e 63 6f 6e 73 69 73 74 65 6e 63 |ome inconsistenc| 00013600 69 65 73 20 69 6e 20 69 74 73 27 20 6f 77 6e 20 |ies in its' own | 00013610 69 6e 74 65 72 6e 61 6c 20 64 61 74 61 20 73 74 |internal data st| 00013620 72 75 63 74 75 72 65 73 2e 20 20 41 6e 79 20 6f |ructures. Any o| 00013630 63 63 75 72 72 65 6e 63 65 73 20 6f 66 20 73 75 |ccurrences of su| 00013640 63 68 20 73 68 6f 75 6c 64 20 62 65 20 73 65 6e |ch should be sen| 00013650 74 2c 20 61 6c 6f 6e 67 20 77 69 74 68 20 74 68 |t, along with th| 00013660 65 20 73 6f 75 72 63 65 20 74 68 61 74 20 70 72 |e source that pr| 00013670 6f 64 75 63 65 64 20 74 68 65 6d 2c 20 74 6f 20 |oduced them, to | 00013680 74 68 65 20 61 75 74 68 6f 72 20 66 6f 72 20 63 |the author for c| 00013690 6f 72 72 65 63 74 69 6e 67 20 69 6e 20 66 75 74 |orrecting in fut| 000136a0 75 72 65 20 75 70 67 72 61 64 65 73 2e 0a 0a 0c |ure upgrades....| 000136b0 0a 0a 38 20 4c 6f 6f 73 65 20 65 6e 64 73 0a 0a |..8 Loose ends..| 000136c0 54 68 65 20 66 61 63 74 20 74 68 61 74 20 74 68 |The fact that th| 000136d0 69 73 20 63 68 61 70 74 65 72 20 65 78 69 73 74 |is chapter exist| 000136e0 73 20 73 68 6f 77 73 20 74 68 61 74 20 49 27 6d |s shows that I'm| 000136f0 20 6e 6f 20 67 6f 6f 64 20 61 74 20 64 6f 63 75 | no good at docu| 00013700 6d 65 6e 74 61 74 69 6f 6e 20 3a 2d 29 20 20 49 |mentation :-) I| 00013710 74 20 6d 61 69 6e 6c 79 20 64 65 73 63 72 69 62 |t mainly describ| 00013720 65 73 20 66 65 61 74 75 72 65 73 20 74 68 61 74 |es features that| 00013730 20 6d 61 79 20 28 6f 72 20 6d 61 79 20 6e 6f 74 | may (or may not| 00013740 29 20 67 65 74 20 69 6d 70 6c 65 6d 65 6e 74 65 |) get implemente| 00013750 64 20 69 6e 20 66 75 74 75 72 65 20 75 70 67 72 |d in future upgr| 00013760 61 64 65 73 2e 0a 0a 38 2e 31 20 4d 65 6d 6f 72 |ades...8.1 Memor| 00013770 79 20 75 73 61 67 65 0a 0a 4c 65 74 27 73 20 66 |y usage..Let's f| 00013780 61 63 65 20 69 74 20 62 6f 79 73 20 61 6e 64 20 |ace it boys and | 00013790 67 69 72 6c 73 2c 20 74 68 69 73 20 70 72 6f 67 |girls, this prog| 000137a0 72 61 6d 20 65 61 74 73 20 52 41 4d 20 6c 69 6b |ram eats RAM lik| 000137b0 65 20 6e 6f 62 6f 64 79 27 73 20 62 75 73 69 6e |e nobody's busin| 000137c0 65 73 73 2e 20 20 49 74 27 73 20 72 65 61 6c 6c |ess. It's reall| 000137d0 79 20 6a 75 73 74 20 61 20 66 61 63 74 20 6f 66 |y just a fact of| 000137e0 20 6c 69 66 65 20 66 6f 72 20 33 32 2d 62 69 74 | life for 32-bit| 000137f0 2f 52 49 53 43 20 6d 61 63 68 69 6e 65 73 2e 0a |/RISC machines..| 00013800 0a 54 68 69 73 20 69 73 20 63 6f 6d 70 6f 75 6e |.This is compoun| 00013810 64 65 64 20 62 79 20 74 68 65 20 6e 65 65 64 20 |ded by the need | 00013820 66 6f 72 20 73 6f 6d 65 20 6f 6f 6d 70 68 20 28 |for some oomph (| 00013830 74 65 63 68 6e 69 63 61 6c 20 74 65 72 6d 29 20 |technical term) | 00013840 69 6e 20 74 68 65 20 70 72 6f 67 72 61 6d 20 65 |in the program e| 00013850 78 65 63 75 74 69 6f 6e 20 73 74 61 6b 65 73 2e |xecution stakes.| 00013860 20 20 54 6f 20 74 68 69 73 20 65 6e 64 20 6d 6f | To this end mo| 00013870 73 74 20 74 68 69 6e 67 73 20 61 72 65 20 6b 65 |st things are ke| 00013880 70 74 20 6f 6e 20 74 77 6f 20 73 65 70 61 72 61 |pt on two separa| 00013890 74 65 20 6c 69 73 74 73 20 2d 20 65 2e 67 2e 20 |te lists - e.g. | 000138a0 69 66 20 61 20 72 6f 75 74 69 6e 65 20 58 20 63 |if a routine X c| 000138b0 61 6c 6c 73 20 59 20 74 68 65 6e 20 74 68 69 73 |alls Y then this| 000138c0 20 69 73 20 72 65 63 6f 72 64 65 64 20 62 6f 74 | is recorded bot| 000138d0 68 20 69 6e 20 58 27 73 20 63 61 6c 6c 73 20 6c |h in X's calls l| 000138e0 69 73 74 2c 20 61 6e 64 20 59 27 73 20 63 61 6c |ist, and Y's cal| 000138f0 6c 65 64 20 62 79 20 6c 69 73 74 2e 20 20 54 68 |led by list. Th| 00013900 69 73 20 62 69 74 20 6f 66 20 72 65 64 75 6e 64 |is bit of redund| 00013910 61 6e 63 79 20 70 72 6f 62 61 62 6c 79 20 64 6f |ancy probably do| 00013920 75 62 6c 65 73 20 74 68 65 20 73 70 65 65 64 20 |ubles the speed | 00013930 6f 66 20 63 72 6f 73 73 20 72 65 66 65 72 65 6e |of cross referen| 00013940 63 69 6e 67 2c 20 73 6f 20 69 74 20 77 61 73 20 |cing, so it was | 00013950 66 65 6c 74 20 77 6f 72 74 68 20 69 74 2e 0a 0a |felt worth it...| 00013960 41 6c 73 6f 20 61 6c 6c 20 74 68 65 20 73 6f 75 |Also all the sou| 00013970 72 63 65 20 69 73 20 6b 65 70 74 20 69 6e 20 52 |rce is kept in R| 00013980 41 4d 2c 20 61 6e 64 20 61 6c 6c 20 74 68 65 20 |AM, and all the | 00013990 6f 75 74 70 75 74 2e 0a 0a 54 68 65 72 65 20 69 |output...There i| 000139a0 73 20 73 6f 6d 65 20 63 6f 6e 73 69 64 65 72 61 |s some considera| 000139b0 74 69 6f 6e 20 74 6f 20 6c 6f 77 2d 6d 65 6d 6f |tion to low-memo| 000139c0 72 79 20 75 73 65 72 73 20 69 6e 20 74 68 61 74 |ry users in that| 000139d0 20 74 68 65 20 68 61 73 68 20 74 61 62 6c 65 20 | the hash table | 000139e0 73 69 7a 65 73 20 67 72 6f 77 20 6f 6e 20 72 65 |sizes grow on re| 000139f0 71 75 65 73 74 2c 20 62 75 74 20 74 68 65 6e 20 |quest, but then | 00013a00 61 67 61 69 6e 20 74 68 65 79 20 73 74 61 72 74 |again they start| 00013a10 20 70 72 65 74 74 79 20 62 69 67 20 61 6e 79 77 | pretty big anyw| 00013a20 61 79 20 3a 2d 29 0a 0a 49 66 20 65 6e 6f 75 67 |ay :-)..If enoug| 00013a30 68 20 70 65 6f 70 6c 65 20 72 65 71 75 65 73 74 |h people request| 00013a40 20 69 74 20 74 68 65 6e 20 42 61 73 43 6f 6d 70 | it then BasComp| 00013a50 72 65 73 73 20 6d 61 79 20 62 65 20 75 70 67 72 |ress may be upgr| 00013a60 61 64 65 64 20 74 6f 20 69 6e 63 6c 75 64 65 20 |aded to include | 00013a70 74 68 65 20 6f 70 74 69 6f 6e 20 6f 66 20 73 6d |the option of sm| 00013a80 61 6c 6c 65 72 20 69 6e 69 74 69 61 6c 20 68 61 |aller initial ha| 00013a90 73 68 2d 74 61 62 6c 65 73 20 61 6e 64 20 64 65 |sh-tables and de| 00013aa0 6d 61 6e 64 2d 6c 6f 61 64 69 6e 67 20 74 68 65 |mand-loading the| 00013ab0 20 73 6f 75 72 63 65 20 2d 20 61 20 73 69 6d 70 | source - a simp| 00013ac0 6c 65 20 68 61 63 6b 20 26 20 73 6c 61 70 2e 0a |le hack & slap..| 00013ad0 0a 38 2e 32 20 4d 69 73 73 69 6e 67 20 54 48 45 |.8.2 Missing THE| 00013ae0 4e 0a 0a 42 61 73 69 63 20 61 6c 6c 6f 77 73 20 |N..Basic allows | 00013af0 74 68 65 20 70 72 6f 67 72 61 6d 6d 65 72 20 74 |the programmer t| 00013b00 6f 20 6f 6d 69 74 20 61 20 54 48 45 4e 20 73 74 |o omit a THEN st| 00013b10 61 74 65 6d 65 6e 74 20 77 68 65 6e 20 75 73 65 |atement when use| 00013b20 64 20 6f 6e 20 61 20 73 69 6e 67 6c 65 2d 6c 69 |d on a single-li| 00013b30 6e 65 20 49 46 20 63 6f 6d 70 6f 75 6e 64 2e 20 |ne IF compound. | 00013b40 20 48 6f 77 65 76 65 72 2c 20 74 68 69 73 20 63 | However, this c| 00013b50 61 6e 20 63 61 75 73 65 20 70 72 6f 62 6c 65 6d |an cause problem| 00013b60 73 2e 20 20 42 65 63 61 75 73 65 20 42 61 73 43 |s. Because BasC| 00013b70 6f 6d 70 72 65 73 73 20 72 65 6d 6f 76 65 73 20 |ompress removes | 00013b80 61 6c 6c 20 73 70 61 63 65 73 2c 20 69 66 20 74 |all spaces, if t| 00013b90 68 65 20 63 6f 6e 64 69 74 69 6f 6e 20 65 6e 64 |he condition end| 00013ba0 65 64 20 77 69 74 68 20 61 20 64 69 67 69 74 2c |ed with a digit,| 00013bb0 20 61 6e 64 20 74 68 65 20 73 74 61 74 65 6d 65 | and the stateme| 00013bc0 6e 74 20 61 66 74 65 72 20 74 68 65 20 28 6d 69 |nt after the (mi| 00013bd0 73 73 69 6e 67 29 20 54 48 45 4e 20 73 74 61 72 |ssing) THEN star| 00013be0 74 73 20 77 69 74 68 20 61 6e 20 90 45 91 20 74 |ts with an .E. t| 00013bf0 68 65 6e 20 42 61 73 69 63 20 67 65 74 73 20 63 |hen Basic gets c| 00013c00 6f 6e 66 75 73 65 64 20 97 20 74 68 69 6e 6b 69 |onfused . thinki| 00013c10 6e 67 20 61 20 72 65 61 6c 20 6e 75 6d 62 65 72 |ng a real number| 00013c20 20 28 69 6e 20 65 78 70 6f 6e 65 6e 74 20 66 6f | (in exponent fo| 00013c30 72 6d 61 74 29 20 68 61 73 20 62 65 65 6e 20 67 |rmat) has been g| 00013c40 69 76 65 6e 2e 20 20 45 67 20 74 68 65 20 42 61 |iven. Eg the Ba| 00013c50 73 43 6f 6d 70 72 65 73 73 20 70 72 6f 64 75 63 |sCompress produc| 00013c60 65 64 20 6c 69 6e 65 3a 0a 0a 09 49 46 20 78 3c |ed line:...IF x<| 00013c70 3e 30 45 25 3d 31 0a 0a 69 73 20 77 72 6f 6e 67 |>0E%=1..is wrong| 00013c80 2e 20 20 54 68 65 72 65 20 73 68 6f 75 6c 64 20 |. There should | 00013c90 62 65 20 61 20 73 70 61 63 65 20 61 66 74 65 72 |be a space after| 00013ca0 20 74 68 65 20 30 2e 20 20 54 68 69 73 20 69 73 | the 0. This is| 00013cb0 20 76 65 72 79 20 72 61 72 65 2e 20 20 41 20 74 | very rare. A t| 00013cc0 65 6d 70 6f 72 61 72 79 20 63 75 72 65 20 69 73 |emporary cure is| 00013cd0 20 74 6f 20 73 74 6f 70 20 42 61 73 43 6f 6d 70 | to stop BasComp| 00013ce0 72 65 73 73 20 73 68 6f 72 74 65 6e 69 6e 67 20 |ress shortening | 00013cf0 61 6e 79 20 76 61 72 69 61 62 6c 65 73 20 74 6f |any variables to| 00013d00 20 6e 61 6d 65 73 20 73 74 61 72 74 69 6e 67 20 | names starting | 00013d10 77 69 74 68 20 61 6e 20 90 45 91 2e 20 20 41 6c |with an .E.. Al| 00013d20 74 68 6f 75 67 68 20 74 68 69 73 20 77 69 6c 6c |though this will| 00013d30 20 73 6f 6c 76 65 20 6d 6f 73 74 20 70 72 6f 62 | solve most prob| 00013d40 6c 65 6d 73 2c 20 74 68 65 72 65 20 69 73 20 73 |lems, there is s| 00013d50 74 69 6c 6c 20 74 68 65 20 75 6e 72 65 73 6f 6c |till the unresol| 00013d60 76 65 64 20 70 72 6f 62 6c 65 6d 20 6f 66 20 74 |ved problem of t| 00013d70 68 65 20 75 6e 2d 73 68 6f 72 74 65 6e 65 64 20 |he un-shortened | 00013d80 76 61 72 69 61 62 6c 65 73 2e 20 20 54 68 65 20 |variables. The | 00013d90 6f 6e 6c 79 20 63 75 72 65 20 69 73 20 74 6f 20 |only cure is to | 00013da0 6d 61 6b 65 20 73 75 72 65 20 74 68 65 20 54 48 |make sure the TH| 00013db0 45 4e 20 69 73 20 61 6c 77 61 79 73 20 75 73 65 |EN is always use| 00013dc0 64 2e 0a 0a 41 20 73 69 6d 69 6c 61 72 20 70 72 |d...A similar pr| 00013dd0 6f 62 6c 65 6d 20 69 73 20 74 68 65 20 66 6f 6c |oblem is the fol| 00013de0 6c 6f 77 69 6e 67 20 42 61 73 43 6f 6d 70 72 65 |lowing BasCompre| 00013df0 73 73 20 70 72 6f 64 75 63 65 64 20 6c 69 6e 65 |ss produced line| 00013e00 3a 0a 0a 09 57 48 49 4c 45 20 78 3c 3e 30 45 25 |:...WHILE x<>0E%| 00013e10 3d 32 0a 0a 54 68 65 20 63 75 72 65 20 66 6f 72 |=2..The cure for| 00013e20 20 74 68 69 73 20 69 73 20 74 6f 20 61 6c 77 61 | this is to alwa| 00013e30 79 73 20 73 65 70 61 72 61 74 65 20 74 68 65 20 |ys separate the | 00013e40 65 78 70 72 65 73 73 69 6f 6e 20 66 72 6f 6d 20 |expression from | 00013e50 74 68 65 20 66 69 72 73 74 20 73 74 61 74 65 6d |the first statem| 00013e60 65 6e 74 20 6f 66 20 61 20 57 48 49 4c 45 20 63 |ent of a WHILE c| 00013e70 6f 6d 70 6f 75 6e 64 20 62 79 20 61 20 63 6f 6c |ompound by a col| 00013e80 6f 6e 2e 0a 0a 0a 0a 57 68 69 6c 65 20 74 65 73 |on.....While tes| 00013e90 74 69 6e 67 20 74 68 69 73 20 70 72 6f 67 72 61 |ting this progra| 00013ea0 6d 2c 20 69 74 20 62 65 63 61 6d 65 20 65 76 69 |m, it became evi| 00013eb0 64 65 6e 74 20 74 68 61 74 20 74 68 65 20 6d 69 |dent that the mi| 00013ec0 73 73 69 6e 67 20 54 48 45 4e 20 77 61 73 20 70 |ssing THEN was p| 00013ed0 61 72 74 20 6f 66 20 61 20 67 65 6e 65 72 61 6c |art of a general| 00013ee0 20 70 72 6f 62 6c 65 6d 20 2d 20 73 6b 69 70 70 | problem - skipp| 00013ef0 69 6e 67 20 61 20 42 61 73 69 63 20 65 78 70 72 |ing a Basic expr| 00013f00 65 73 73 69 6f 6e 2e 20 20 54 68 69 73 20 69 73 |ession. This is| 00013f10 20 68 61 72 64 65 72 20 74 68 61 6e 20 61 74 20 | harder than at | 00013f20 66 69 72 73 74 20 73 65 65 6d 73 2c 20 62 65 63 |first seems, bec| 00013f30 61 75 73 65 20 74 68 65 72 65 20 69 73 20 6e 6f |ause there is no| 00013f40 20 70 6f 69 6e 74 20 61 74 20 77 68 65 72 65 20 | point at where | 00013f50 79 6f 75 20 63 61 6e 20 73 61 79 20 94 79 65 73 |you can say .yes| 00013f60 2c 20 68 65 72 65 20 69 73 20 74 68 65 20 65 6e |, here is the en| 00013f70 64 95 2c 20 61 73 20 79 6f 75 20 63 61 6e 20 69 |d., as you can i| 00013f80 6e 20 61 20 70 72 6f 63 65 64 75 72 61 6c 20 63 |n a procedural c| 00013f90 61 6c 6c 2c 20 73 61 79 20 28 65 2e 67 2e 20 79 |all, say (e.g. y| 00013fa0 6f 75 27 76 65 20 66 6f 75 6e 64 20 61 20 63 6f |ou've found a co| 00013fb0 6d 6d 61 2c 20 63 6c 6f 73 65 20 65 6c 6c 69 70 |mma, close ellip| 00013fc0 73 65 20 61 6e 64 20 74 68 65 20 62 72 61 63 6b |se and the brack| 00013fd0 65 74 20 61 6e 64 20 71 75 6f 74 65 20 63 6f 75 |et and quote cou| 00013fe0 6e 74 20 69 73 20 7a 65 72 6f 29 2e 20 20 45 2e |nt is zero). E.| 00013ff0 67 2e 20 68 6f 77 20 77 6f 75 6c 64 20 79 6f 75 |g. how would you| 00014000 20 68 61 6e 64 6c 65 20 74 68 69 73 3a 0a 0a 09 | handle this:...| 00014010 49 46 20 61 3d 62 3d 63 20 54 48 45 4e 20 50 2e |IF a=b=c THEN P.| 00014020 22 68 65 6c 6c 6f 22 0a 0a 49 6e 74 75 69 74 69 |"hello"..Intuiti| 00014030 6f 6e 20 67 65 74 27 73 20 69 74 20 77 72 6f 6e |on get's it wron| 00014040 67 2e 20 20 42 61 73 69 63 20 74 72 65 61 74 73 |g. Basic treats| 00014050 20 74 68 69 73 20 61 73 3a 0a 0a 09 49 46 20 28 | this as:...IF (| 00014060 61 3d 62 29 20 54 48 45 4e 20 3d 63 20 2e 2e 2e |a=b) THEN =c ...| 00014070 0a 0a 57 68 69 63 68 20 6d 65 61 6e 73 20 79 6f |..Which means yo| 00014080 75 20 68 61 76 65 20 74 6f 20 62 75 69 6c 64 20 |u have to build | 00014090 61 20 74 72 65 65 2f 73 74 61 63 6b 2e 20 20 42 |a tree/stack. B| 000140a0 75 74 2c 20 6f 6e 63 65 20 79 6f 75 20 63 61 6e |ut, once you can| 000140b0 20 64 6f 20 74 68 69 73 20 74 68 65 6e 20 74 68 | do this then th| 000140c0 69 73 20 70 72 6f 67 72 61 6d 20 63 6f 75 6c 64 |is program could| 000140d0 20 62 65 63 6f 6d 65 20 71 75 69 74 65 20 69 6e | become quite in| 000140e0 74 65 72 65 73 74 69 6e 67 2e 20 20 49 74 20 63 |teresting. It c| 000140f0 6f 75 6c 64 20 65 76 61 6c 75 61 74 65 20 63 6f |ould evaluate co| 00014100 6e 73 74 61 6e 74 20 73 75 62 2d 65 78 70 72 65 |nstant sub-expre| 00014110 73 73 69 6f 6e 73 2e 20 20 54 68 69 73 20 63 6f |ssions. This co| 00014120 75 6c 64 20 70 72 6f 64 75 63 65 20 73 6f 6d 65 |uld produce some| 00014130 20 76 65 72 79 20 63 6f 6d 70 61 63 74 20 73 74 | very compact st| 00014140 75 66 66 2c 20 61 73 20 79 6f 75 27 64 20 61 6c |uff, as you'd al| 00014150 73 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 73 75 |so be able to su| 00014160 62 73 74 69 74 75 74 65 20 63 6f 6e 73 74 61 6e |bstitute constan| 00014170 74 20 76 61 72 69 61 62 6c 65 73 20 77 69 74 68 |t variables with| 00014180 20 74 68 65 69 72 20 76 61 6c 75 65 73 2c 20 61 | their values, a| 00014190 6e 64 20 65 76 65 6e 20 65 6c 69 6d 69 6e 61 74 |nd even eliminat| 000141a0 65 20 64 65 61 64 20 63 6f 64 65 2e 20 20 49 2e |e dead code. I.| 000141b0 65 2e 20 64 65 62 75 67 67 69 6e 67 20 73 74 75 |e. debugging stu| 000141c0 66 66 20 74 68 61 74 20 77 6f 75 6c 64 20 6e 65 |ff that would ne| 000141d0 76 65 72 20 62 65 20 65 78 65 63 75 74 65 64 20 |ver be executed | 000141e0 62 65 63 61 75 73 65 20 69 74 20 69 73 20 6b 6e |because it is kn| 000141f0 6f 77 6e 20 74 68 61 74 2c 20 73 61 79 2c 20 44 |own that, say, D| 00014200 65 62 75 67 20 69 73 20 61 6c 77 61 79 73 20 46 |ebug is always F| 00014210 41 4c 53 45 2e 0a 0a 42 75 74 2c 20 74 69 65 20 |ALSE...But, tie | 00014220 74 68 61 74 20 69 6e 20 77 69 74 68 20 61 20 62 |that in with a b| 00014230 69 74 20 6d 6f 72 65 20 6b 6e 6f 77 6c 65 64 67 |it more knowledg| 00014240 65 20 6f 66 20 74 68 65 20 73 74 72 75 63 74 75 |e of the structu| 00014250 72 65 20 6f 66 20 74 68 65 20 42 61 73 69 63 2c |re of the Basic,| 00014260 20 61 6e 64 20 69 74 20 69 73 20 61 6c 6d 6f 73 | and it is almos| 00014270 74 20 65 61 73 79 20 74 6f 20 67 65 6e 65 72 61 |t easy to genera| 00014280 74 65 20 6e 6f 74 20 74 6f 6b 65 6e 69 73 65 64 |te not tokenised| 00014290 20 42 61 73 69 63 2c 20 62 75 74 20 63 6f 64 65 | Basic, but code| 000142a0 2e 20 20 57 65 6c 6c 2c 20 49 27 6d 20 73 75 72 |. Well, I'm sur| 000142b0 65 20 69 66 20 65 6e 6f 75 67 68 20 70 65 6f 70 |e if enough peop| 000142c0 6c 65 20 72 65 67 69 73 74 65 72 2c 20 69 74 20 |le register, it | 000142d0 77 69 6c 6c 20 67 69 76 65 20 74 68 69 73 20 61 |will give this a| 000142e0 75 74 68 6f 72 20 74 68 65 20 69 6e 63 65 6e 74 |uthor the incent| 000142f0 69 76 65 20 74 6f 20 64 65 76 65 6c 6f 70 20 42 |ive to develop B| 00014300 61 73 43 6f 6d 70 72 65 73 73 20 69 6e 74 6f 20 |asCompress into | 00014310 74 68 65 20 66 61 73 74 65 73 74 20 28 61 6e 64 |the fastest (and| 00014320 20 63 68 65 61 70 65 73 74 29 20 42 61 73 69 63 | cheapest) Basic| 00014330 20 63 6f 6d 70 69 6c 65 72 2e 0a 0a 38 2e 33 20 | compiler...8.3 | 00014340 43 72 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 0a |Cross-reference.| 00014350 0a 49 74 20 77 6f 75 6c 64 20 62 65 20 6e 69 63 |.It would be nic| 00014360 65 20 74 6f 20 68 61 76 65 20 61 20 74 6f 67 67 |e to have a togg| 00014370 6c 65 20 62 65 74 77 65 65 6e 20 6d 75 6c 74 69 |le between multi| 00014380 2d 6c 69 6e 65 20 61 6e 64 20 73 69 6e 67 6c 65 |-line and single| 00014390 2d 6c 69 6e 65 20 28 74 68 65 20 63 75 72 72 65 |-line (the curre| 000143a0 6e 74 29 20 6f 75 74 70 75 74 2e 20 20 54 68 69 |nt) output. Thi| 000143b0 73 20 69 73 20 66 61 69 72 6c 79 20 65 61 73 79 |s is fairly easy| 000143c0 20 74 6f 20 64 6f 2c 20 62 75 74 20 69 74 27 6c | to do, but it'l| 000143d0 6c 20 72 65 71 75 69 72 65 20 73 6f 6d 65 20 65 |l require some e| 000143e0 78 70 65 72 69 6d 65 6e 74 61 74 69 6f 6e 20 3a |xperimentation :| 000143f0 2d 29 0a 0a 41 6c 73 6f 20 68 61 6e 64 79 20 63 |-)..Also handy c| 00014400 6f 75 6c 64 20 62 65 20 73 6f 6d 65 20 6f 72 64 |ould be some ord| 00014410 65 72 69 6e 67 20 62 61 73 65 64 20 6f 6e 20 6c |ering based on l| 00014420 61 62 65 6c 20 6c 65 6e 67 74 68 2c 20 6f 72 20 |abel length, or | 00014430 65 76 65 6e 20 74 68 65 20 28 61 70 70 72 6f 78 |even the (approx| 00014440 69 6d 61 74 65 29 20 73 69 7a 65 20 6f 66 20 61 |imate) size of a| 00014450 20 72 6f 75 74 69 6e 65 2e 0a 0a 53 6f 6d 65 20 | routine...Some | 00014460 72 61 74 69 6f 6e 61 6c 69 73 61 74 69 6f 6e 20 |rationalisation | 00014470 6f 66 20 74 68 65 20 6d 65 73 73 61 67 65 73 20 |of the messages | 00014480 75 73 65 64 20 69 73 20 69 6e 20 6f 72 64 65 72 |used is in order| 00014490 2c 20 74 6f 6f 2e 20 20 43 75 72 72 65 6e 74 6c |, too. Currentl| 000144a0 79 20 74 68 65 20 70 72 6f 67 72 61 6d 20 6f 75 |y the program ou| 000144b0 74 70 75 74 73 20 73 6f 6d 65 20 6c 69 6e 65 20 |tputs some line | 000144c0 66 65 65 64 73 20 6f 66 20 69 74 73 27 20 6f 77 |feeds of its' ow| 000144d0 6e 20 61 63 63 6f 72 64 2c 20 77 68 69 63 68 20 |n accord, which | 000144e0 69 73 20 64 65 63 69 64 65 64 6c 79 20 61 67 61 |is decidedly aga| 000144f0 69 6e 73 74 20 74 68 65 20 67 72 61 69 6e 2e 0a |inst the grain..| 00014500 0a 48 6f 77 20 61 62 6f 75 74 20 6e 6f 74 20 6c |.How about not l| 00014510 69 73 74 69 6e 67 20 74 68 65 20 66 69 6c 65 20 |isting the file | 00014520 74 68 61 74 20 61 20 72 6f 75 74 69 6e 65 20 69 |that a routine i| 00014530 73 20 69 6e 3f 20 20 4f 72 20 6a 75 73 74 20 74 |s in? Or just t| 00014540 68 65 20 6c 65 61 66 20 6f 66 20 74 68 65 20 66 |he leaf of the f| 00014550 69 6c 65 6e 61 6d 65 2e 20 20 54 68 69 73 20 77 |ilename. This w| 00014560 6f 75 6c 64 20 72 65 64 75 63 65 20 74 68 65 20 |ould reduce the | 00014570 73 69 7a 65 20 6f 66 20 74 68 65 20 6f 75 74 70 |size of the outp| 00014580 75 74 20 62 79 20 71 75 69 74 65 20 61 20 6c 6f |ut by quite a lo| 00014590 74 2e 20 20 54 68 65 20 66 6f 72 6d 65 72 20 77 |t. The former w| 000145a0 6f 75 6c 64 20 72 65 71 75 69 72 65 20 74 68 65 |ould require the| 000145b0 20 75 73 65 72 20 74 6f 20 63 72 6f 73 73 2d 72 | user to cross-r| 000145c0 65 66 65 72 65 6e 63 65 20 28 74 68 65 20 63 72 |eference (the cr| 000145d0 6f 73 73 2d 72 65 66 65 72 65 6e 63 65 21 29 20 |oss-reference!) | 000145e0 74 6f 20 66 69 6e 64 20 74 68 65 20 66 69 6c 65 |to find the file| 000145f0 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 | of the referenc| 00014600 65 2c 20 74 68 6f 75 67 68 2e 0a 0a 38 2e 34 20 |e, though...8.4 | 00014610 53 74 61 74 69 73 74 69 63 73 0a 0a 54 68 65 72 |Statistics..Ther| 00014620 65 20 61 72 65 20 6c 6f 61 64 73 20 6d 6f 72 65 |e are loads more| 00014630 20 73 74 61 74 69 73 74 69 63 73 20 74 68 61 74 | statistics that| 00014640 20 63 6f 75 6c 64 20 62 65 20 64 6f 6e 65 3b 0a | could be done;.| 00014650 0a 09 8f 09 6c 69 62 72 61 72 69 65 73 20 74 68 |....libraries th| 00014660 61 74 20 61 72 65 6e 27 74 20 6e 65 65 64 65 64 |at aren't needed| 00014670 0a 0a 09 8f 09 76 61 72 69 61 62 6c 65 73 20 6f |.....variables o| 00014680 6e 6c 79 20 65 76 65 72 20 64 65 63 6c 61 72 65 |nly ever declare| 00014690 64 20 28 65 2e 67 2e 20 4c 4f 43 41 4c 69 73 65 |d (e.g. LOCALise| 000146a0 64 20 62 75 74 20 6e 65 76 65 72 20 75 73 65 64 |d but never used| 000146b0 29 0a 0a 09 8f 09 76 61 72 69 61 62 6c 65 73 20 |).....variables | 000146c0 6f 6e 6c 79 20 65 76 65 72 20 61 73 73 69 67 6e |only ever assign| 000146d0 65 64 20 74 6f 20 6f 6e 63 65 20 28 63 6f 6e 73 |ed to once (cons| 000146e0 74 61 6e 74 73 29 0a 0a 09 8f 09 6c 69 6e 65 73 |tants).....lines| 000146f0 20 77 68 65 72 65 20 74 68 65 20 6d 65 6d 6f 72 | where the memor| 00014700 79 20 69 6e 64 69 72 65 63 74 69 6f 6e 20 6f 70 |y indirection op| 00014710 65 72 61 74 6f 72 73 20 3f 2c 20 7c 20 61 6e 64 |erators ?, | and| 00014720 20 21 20 61 72 65 20 75 73 65 64 0a 0a 09 8f 09 | ! are used.....| 00014730 64 6f 6e 27 74 20 6c 6f 67 20 61 6c 6c 20 74 68 |don't log all th| 00014740 65 20 64 65 6c 65 74 65 64 20 72 6f 75 74 69 6e |e deleted routin| 00014750 65 73 20 61 6e 64 20 76 61 72 69 61 62 6c 65 73 |es and variables| 00014760 2c 20 6a 75 73 74 20 63 6f 75 6e 74 20 74 68 65 |, just count the| 00014770 6d 0a 0a 09 8f 09 67 69 76 65 20 61 20 70 65 72 |m.....give a per| 00014780 63 65 6e 74 61 67 65 20 6f 66 20 74 68 65 20 63 |centage of the c| 00014790 6f 64 65 20 74 68 61 74 20 69 73 20 75 6e 75 73 |ode that is unus| 000147a0 65 64 0a 0a 09 8f 09 70 65 72 63 65 6e 74 61 67 |ed.....percentag| 000147b0 65 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 61 63 |e compression ac| 000147c0 68 69 65 76 65 64 20 6f 6e 20 74 68 65 20 75 73 |hieved on the us| 000147d0 65 64 20 63 6f 64 65 0a 0a 09 8f 09 6c 69 6e 65 |ed code.....line| 000147e0 73 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 6e 79 |s containing any| 000147f0 20 75 73 65 72 2d 64 65 66 69 6e 65 64 20 62 61 | user-defined ba| 00014800 73 69 63 20 74 6f 6b 65 6e 20 28 65 2e 67 2e 20 |sic token (e.g. | 00014810 50 52 49 4e 54 29 0a 0a 09 8f 09 74 69 6d 65 20 |PRINT).....time | 00014820 74 61 6b 65 6e 20 74 6f 20 6c 6f 61 64 2c 20 70 |taken to load, p| 00014830 61 72 73 65 2c 20 63 72 6f 73 73 2d 72 65 66 65 |arse, cross-refe| 00014840 72 65 6e 63 65 2c 20 63 6f 6d 70 72 65 73 73 2c |rence, compress,| 00014850 20 77 72 69 74 65 0a 0a 38 2e 35 20 55 6e 63 6f | write..8.5 Unco| 00014860 6d 70 72 65 73 73 65 64 20 6f 75 74 70 75 74 0a |mpressed output.| 00014870 0a 49 74 20 77 6f 75 6c 64 20 68 61 76 65 20 62 |.It would have b| 00014880 65 65 6e 20 6e 69 63 65 20 69 66 20 74 68 65 72 |een nice if ther| 00014890 65 20 77 61 73 20 61 6e 20 6f 70 74 69 6f 6e 20 |e was an option | 000148a0 74 6f 20 6a 75 73 74 20 72 65 6d 6f 76 65 20 74 |to just remove t| 000148b0 68 65 20 75 6e 75 73 65 64 20 72 6f 75 74 69 6e |he unused routin| 000148c0 65 73 20 61 6e 64 20 6d 65 72 67 65 20 61 6c 6c |es and merge all| 000148d0 20 74 68 65 20 6c 69 62 72 61 72 69 65 73 20 69 | the libraries i| 000148e0 6e 74 6f 20 6f 6e 65 20 62 69 67 20 66 69 6c 65 |nto one big file| 000148f0 2e 20 20 54 68 69 73 20 77 6f 75 6c 64 20 67 69 |. This would gi| 00014900 76 65 20 61 20 6e 69 63 65 20 6c 69 73 74 61 62 |ve a nice listab| 00014910 6c 65 20 70 72 6f 67 72 61 6d 20 63 6f 6e 74 61 |le program conta| 00014920 69 6e 69 6e 67 20 6f 6e 6c 79 20 74 68 65 20 72 |ining only the r| 00014930 6f 75 74 69 6e 65 73 20 75 73 65 64 2e 20 20 48 |outines used. H| 00014940 6f 77 65 76 65 72 20 74 68 69 73 20 69 73 20 63 |owever this is c| 00014950 75 72 72 65 6e 74 6c 79 20 75 6e 70 6f 73 73 69 |urrently unpossi| 00014960 62 6c 65 2c 20 61 73 20 42 61 73 43 6f 6d 70 72 |ble, as BasCompr| 00014970 65 73 73 20 77 61 73 20 6e 65 76 65 72 20 69 6e |ess was never in| 00014980 74 65 6e 64 65 64 20 74 6f 20 70 72 6f 64 75 63 |tended to produc| 00014990 65 20 61 6e 79 74 68 69 6e 67 20 62 75 74 20 63 |e anything but c| 000149a0 6f 6d 70 72 65 73 73 65 64 20 63 6f 64 65 2e 20 |ompressed code. | 000149b0 20 28 54 68 65 72 65 20 61 72 65 20 6d 61 6e 79 | (There are many| 000149c0 20 70 6c 61 63 65 73 20 77 68 65 72 65 20 94 73 | places where .s| 000149d0 6b 69 70 20 75 6e 74 69 6c 20 68 69 74 20 6e 6f |kip until hit no| 000149e0 6e 2d 73 70 61 63 65 95 20 69 73 20 68 61 72 64 |n-space. is hard| 000149f0 2d 63 6f 64 65 64 2c 20 61 6e 64 20 69 74 20 77 |-coded, and it w| 00014a00 6f 75 6c 64 20 74 61 6b 65 20 61 20 72 61 74 68 |ould take a rath| 00014a10 65 72 20 6c 6f 6e 67 20 74 69 6d 65 20 74 6f 20 |er long time to | 00014a20 72 61 74 69 6f 6e 61 6c 69 73 65 20 74 68 65 73 |rationalise thes| 00014a30 65 20 73 6f 20 79 6f 75 20 63 6f 75 6c 64 20 74 |e so you could t| 00014a40 6f 67 67 6c 65 20 69 74 20 6f 6e 2f 6f 66 66 2e |oggle it on/off.| 00014a50 29 20 20 4f 68 20 77 65 6c 6c 2e 0a 0a 38 2e 36 |) Oh well...8.6| 00014a60 20 4c 61 62 65 6c 20 72 65 64 75 63 74 69 6f 6e | Label reduction| 00014a70 0a 0a 54 68 65 20 72 65 64 75 63 74 69 6f 6e 20 |..The reduction | 00014a80 6f 66 20 6c 61 62 65 6c 73 20 69 73 6e 27 74 20 |of labels isn't | 00014a90 61 6c 77 61 79 73 20 61 73 20 67 6f 6f 64 20 61 |always as good a| 00014aa0 73 20 69 74 20 63 6f 75 6c 64 20 62 65 2e 20 20 |s it could be. | 00014ab0 43 75 72 72 65 6e 74 6c 79 20 42 61 73 43 6f 6d |Currently BasCom| 00014ac0 70 72 65 73 73 20 6f 6e 6c 79 20 6a 75 64 67 65 |press only judge| 00014ad0 73 20 74 68 65 20 66 69 74 6e 65 73 73 20 6f 66 |s the fitness of| 00014ae0 20 61 20 6c 61 62 65 6c 20 74 6f 20 62 65 20 72 | a label to be r| 00014af0 65 64 75 63 65 64 20 6f 6e 20 69 74 73 27 20 67 |educed on its' g| 00014b00 6c 6f 62 61 6c 20 75 73 61 67 65 2e 20 20 41 20 |lobal usage. A | 00014b10 62 65 74 74 65 72 20 61 6c 67 6f 72 69 74 68 6d |better algorithm| 00014b20 20 77 6f 75 6c 64 20 74 61 6b 65 20 69 6e 74 6f | would take into| 00014b30 20 63 6f 6e 73 69 64 65 72 61 74 69 6f 6e 20 74 | consideration t| 00014b40 68 65 20 6e 65 73 74 69 6e 67 20 6c 65 76 65 6c |he nesting level| 00014b50 20 6f 66 20 65 61 63 68 20 75 73 61 67 65 2c 20 | of each usage, | 00014b60 61 6e 64 20 75 73 65 20 74 68 69 73 20 74 6f 20 |and use this to | 00014b70 62 69 61 73 20 74 68 65 20 72 65 64 75 63 74 69 |bias the reducti| 00014b80 6f 6e 20 6f 66 20 6c 61 62 65 6c 73 20 74 6f 77 |on of labels tow| 00014b90 61 72 64 73 20 74 68 6f 73 65 20 75 73 65 64 20 |ards those used | 00014ba0 69 6e 73 69 64 65 20 6c 6f 6f 70 73 2e 0a 0a 38 |inside loops...8| 00014bb0 2e 37 20 45 78 65 63 75 74 61 62 6c 65 0a 0a 54 |.7 Executable..T| 00014bc0 68 65 20 63 75 72 72 65 6e 74 20 73 69 74 75 61 |he current situa| 00014bd0 74 69 6f 6e 2c 20 77 69 74 68 20 74 77 6f 20 73 |tion, with two s| 00014be0 65 70 61 72 61 74 65 20 61 70 70 6c 69 63 61 74 |eparate applicat| 00014bf0 69 6f 6e 73 20 69 73 20 66 61 72 20 66 72 6f 6d |ions is far from| 00014c00 20 69 64 65 61 6c 2e 20 20 41 20 62 65 74 74 65 | ideal. A bette| 00014c10 72 20 73 69 74 75 61 74 69 6f 6e 20 77 6f 75 6c |r situation woul| 00014c20 64 20 62 65 20 74 6f 20 68 61 76 65 20 74 68 65 |d be to have the| 00014c30 20 62 61 63 6b 20 65 6e 64 20 70 72 6f 67 72 61 | back end progra| 00014c40 6d 20 69 6e 73 69 64 65 20 61 20 6d 6f 64 75 6c |m inside a modul| 00014c50 65 2e 20 20 54 68 69 73 20 77 6f 75 6c 64 20 68 |e. This would h| 00014c60 61 76 65 20 74 68 65 20 61 64 64 65 64 20 62 6f |ave the added bo| 00014c70 6e 75 73 20 6f 66 20 6e 6f 74 20 6e 65 65 64 69 |nus of not needi| 00014c80 6e 67 20 74 6f 20 6c 6f 61 64 20 69 6e 20 74 68 |ng to load in th| 00014c90 65 20 4d 65 73 73 61 67 65 73 20 66 69 6c 65 20 |e Messages file | 00014ca0 65 76 65 72 79 20 74 69 6d 65 20 69 74 20 69 73 |every time it is| 00014cb0 20 72 75 6e 2e 0a 0a 42 65 74 74 65 72 20 79 65 | run...Better ye| 00014cc0 74 20 77 6f 75 6c 64 20 62 65 20 74 6f 20 68 61 |t would be to ha| 00014cd0 76 65 20 74 68 65 20 77 68 6f 6c 65 20 74 68 69 |ve the whole thi| 00014ce0 6e 67 20 61 73 20 6f 6e 65 20 62 69 67 20 57 69 |ng as one big Wi| 00014cf0 6d 70 20 61 70 70 6c 69 63 61 74 69 6f 6e 2e 20 |mp application. | 00014d00 20 48 65 72 65 20 6d 61 6e 79 20 65 78 74 72 61 | Here many extra| 00014d10 73 20 61 72 65 20 70 6f 73 73 69 62 6c 65 20 62 |s are possible b| 00014d20 65 63 61 75 73 65 20 74 68 65 72 65 20 77 6f 75 |ecause there wou| 00014d30 6c 64 20 62 65 20 64 69 72 65 63 74 20 61 63 63 |ld be direct acc| 00014d40 65 73 73 20 74 6f 20 74 68 65 20 63 72 6f 73 73 |ess to the cross| 00014d50 2d 72 65 66 65 72 65 6e 63 65 20 64 61 74 61 62 |-reference datab| 00014d60 61 73 65 2e 20 20 46 6f 72 20 65 78 61 6d 70 6c |ase. For exampl| 00014d70 65 20 69 74 20 63 6f 75 6c 64 20 63 72 65 61 74 |e it could creat| 00014d80 65 20 67 72 61 70 68 73 20 6f 66 20 76 61 72 69 |e graphs of vari| 00014d90 61 62 6c 65 20 6e 61 6d 65 20 64 69 73 74 72 69 |able name distri| 00014da0 62 75 74 69 6f 6e 2c 20 70 72 6f 76 69 64 65 20 |bution, provide | 00014db0 74 68 65 20 63 72 6f 73 73 2d 72 65 66 65 72 65 |the cross-refere| 00014dc0 6e 63 65 20 69 6e 20 69 74 27 73 20 6f 77 6e 20 |nce in it's own | 00014dd0 77 69 6e 64 6f 77 2c 20 77 68 65 72 65 20 79 6f |window, where yo| 00014de0 75 20 63 6f 75 6c 64 20 66 69 6c 74 65 72 20 69 |u could filter i| 00014df0 74 20 67 69 76 65 6e 20 75 73 65 72 20 63 72 69 |t given user cri| 00014e00 74 65 72 69 61 20 28 73 75 63 68 20 61 73 20 6e |teria (such as n| 00014e10 61 6d 65 20 6d 61 74 63 68 69 6e 67 20 61 20 72 |ame matching a r| 00014e20 65 67 65 78 70 20 41 4e 44 20 75 73 61 67 65 3e |egexp AND usage>| 00014e30 33 29 2e 20 20 42 75 74 20 49 20 64 6f 6e 27 74 |3). But I don't| 00014e40 20 74 68 69 6e 6b 20 73 6f 2c 20 64 6f 20 79 6f | think so, do yo| 00014e50 75 3f 0a 0a 0c 0a 0a 41 70 70 65 6e 64 69 78 20 |u?.....Appendix | 00014e60 41 3a 20 4d 65 73 73 61 67 65 73 0a 0a 41 2e 31 |A: Messages..A.1| 00014e70 20 49 6e 74 65 72 6e 61 74 69 6f 6e 61 6c 69 73 | Internationalis| 00014e80 6d 20 75 6e 69 74 65 64 0a 0a 46 6f 72 20 75 73 |m united..For us| 00014e90 65 72 73 20 6f 66 20 61 20 66 6f 72 65 69 67 6e |ers of a foreign| 00014ea0 20 65 78 74 72 61 63 74 6d 65 6e 74 2c 20 74 68 | extractment, th| 00014eb0 65 20 4d 65 73 73 61 67 65 73 20 64 69 72 65 63 |e Messages direc| 00014ec0 74 6f 72 79 20 63 6f 6e 74 61 69 6e 73 20 74 68 |tory contains th| 00014ed0 65 20 63 6f 75 6e 74 72 79 2d 73 70 65 63 69 66 |e country-specif| 00014ee0 69 63 20 74 65 78 74 20 66 69 6c 65 73 2e 20 20 |ic text files. | 00014ef0 43 6f 70 79 20 44 65 66 61 75 6c 74 2c 20 74 6f |Copy Default, to| 00014f00 20 28 73 61 79 29 20 49 63 65 6c 61 6e 64 20 61 | (say) Iceland a| 00014f10 6e 64 20 65 64 69 74 20 74 68 65 20 6d 65 73 73 |nd edit the mess| 00014f20 61 67 65 73 2c 20 61 6e 64 20 69 66 20 74 68 61 |ages, and if tha| 00014f30 74 20 69 73 20 74 68 65 20 63 6f 6e 66 69 67 75 |t is the configu| 00014f40 72 65 64 20 63 6f 75 6e 74 72 79 20 6f 66 20 74 |red country of t| 00014f50 68 65 20 6d 61 63 68 69 6e 65 2c 20 74 68 65 6e |he machine, then| 00014f60 20 74 68 6f 73 65 20 6d 65 73 73 61 67 65 73 20 | those messages | 00014f70 77 69 6c 6c 20 62 65 20 6c 6f 61 64 65 64 2e 20 |will be loaded. | 00014f80 20 4e 6f 74 65 20 69 74 20 69 73 20 73 65 6e 73 | Note it is sens| 00014f90 69 62 6c 65 20 74 6f 20 6b 65 65 70 20 61 20 44 |ible to keep a D| 00014fa0 65 66 61 75 6c 74 20 66 69 6c 65 20 61 73 20 74 |efault file as t| 00014fb0 68 69 73 20 77 69 6c 6c 20 62 65 20 6c 6f 61 64 |his will be load| 00014fc0 65 64 20 69 66 20 6e 6f 20 66 69 6c 65 20 6f 66 |ed if no file of| 00014fd0 20 74 68 65 20 63 6f 6e 66 69 67 75 72 65 64 20 | the configured | 00014fe0 63 6f 75 6e 74 72 79 20 63 6f 75 6c 64 20 62 65 |country could be| 00014ff0 20 66 6f 75 6e 64 2e 0a 0a 49 66 20 79 6f 75 20 | found...If you | 00015000 64 6f 20 6d 61 6b 65 20 61 20 74 72 61 6e 73 6c |do make a transl| 00015010 61 74 65 64 20 6d 65 73 73 61 67 65 73 20 66 69 |ated messages fi| 00015020 6c 65 2c 20 74 68 65 20 61 75 74 68 6f 72 20 77 |le, the author w| 00015030 6f 75 6c 64 20 61 70 70 72 65 63 69 61 74 65 20 |ould appreciate | 00015040 69 74 20 67 72 65 61 74 6c 79 20 69 66 20 79 6f |it greatly if yo| 00015050 75 20 63 6f 75 6c 64 20 73 65 6e 64 20 69 74 20 |u could send it | 00015060 69 6e 20 73 6f 20 65 76 65 72 79 20 6f 6e 65 20 |in so every one | 00015070 63 61 6e 20 62 65 6e 65 66 69 74 2e 0a 0a 41 2e |can benefit...A.| 00015080 32 20 46 6f 72 6d 61 74 0a 0a 54 68 65 20 6d 65 |2 Format..The me| 00015090 73 73 61 67 65 20 66 6f 72 6d 61 74 20 69 73 20 |ssage format is | 000150a0 66 61 69 72 6c 79 20 6f 62 76 69 6f 75 73 20 2d |fairly obvious -| 000150b0 20 6a 75 73 74 20 6c 6f 6f 6b 20 61 74 20 74 68 | just look at th| 000150c0 65 6d 20 74 6f 20 73 65 65 20 77 68 61 74 20 63 |em to see what c| 000150d0 61 6e 20 61 6e 64 20 63 61 6e 27 74 20 62 65 20 |an and can't be | 000150e0 64 6f 6e 65 2c 20 62 75 74 20 68 65 72 65 27 73 |done, but here's| 000150f0 20 61 20 71 75 69 63 6b 20 73 75 6d 6d 61 72 79 | a quick summary| 00015100 2e 0a 0a 09 8f 09 43 6f 6d 6d 65 6e 74 73 20 73 |......Comments s| 00015110 74 61 72 74 20 77 69 74 68 20 61 20 23 0a 0a 09 |tart with a #...| 00015120 8f 09 4d 65 73 73 61 67 65 73 20 6e 61 6d 65 73 |..Messages names| 00015130 20 73 74 61 72 74 20 6f 6e 20 61 20 6e 65 77 20 | start on a new | 00015140 6c 69 6e 65 2c 20 61 6e 64 20 65 6e 64 20 69 6e |line, and end in| 00015150 20 61 20 63 6f 6c 6f 6e 0a 0a 09 8f 09 4d 65 73 | a colon.....Mes| 00015160 73 61 67 65 73 20 73 74 61 72 74 20 61 74 20 74 |sages start at t| 00015170 68 65 20 66 69 72 73 74 20 6e 6f 6e 2d 73 70 61 |he first non-spa| 00015180 63 65 20 61 66 74 65 72 20 74 68 65 20 63 6f 6c |ce after the col| 00015190 6f 6e 2c 20 61 6e 64 20 66 69 6e 69 73 68 20 61 |on, and finish a| 000151a0 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 |t the end of the| 000151b0 20 6c 69 6e 65 0a 0a 09 8f 09 53 70 61 63 65 73 | line.....Spaces| 000151c0 20 63 61 6e 20 62 65 20 64 6f 6e 65 20 61 73 20 | can be done as | 000151d0 94 25 20 95 0a 0a 09 8f 09 50 65 72 63 65 6e 74 |.% ......Percent| 000151e0 73 20 63 61 6e 20 62 65 20 69 6e 63 6c 75 64 65 |s can be include| 000151f0 64 20 75 73 69 6e 67 20 94 25 25 95 0a 0a 09 8f |d using .%%.....| 00015200 09 54 68 65 20 94 70 61 72 61 6d 65 74 65 72 95 |.The .parameter.| 00015210 73 20 25 73 20 61 6e 64 20 25 64 20 61 72 65 20 |s %s and %d are | 00015220 73 75 70 70 6c 69 65 64 20 62 79 20 42 61 73 43 |supplied by BasC| 00015230 6f 6d 70 72 65 73 73 2c 20 74 68 65 73 65 20 61 |ompress, these a| 00015240 72 65 20 73 74 61 6e 64 61 72 64 20 43 20 70 72 |re standard C pr| 00015250 69 6e 74 66 28 29 20 73 74 72 69 6e 67 73 0a 0a |intf() strings..| 00015260 09 8f 09 54 68 65 20 73 74 61 6e 64 61 72 64 20 |...The standard | 00015270 43 20 65 73 63 61 70 65 20 73 65 71 75 65 6e 63 |C escape sequenc| 00015280 65 73 20 5c 62 2c 20 5c 74 2c 20 5c 6e 2c 20 5c |es \b, \t, \n, \| 00015290 72 2c 20 5c 78 58 58 2c 20 5c 30 30 30 2c 20 65 |r, \xXX, \000, e| 000152a0 74 63 2e 20 63 61 6e 20 62 65 20 75 73 65 64 20 |tc. can be used | 000152b0 74 6f 20 69 6e 73 65 72 74 20 74 68 6f 73 65 20 |to insert those | 000152c0 63 68 61 72 61 63 74 65 72 73 20 69 6e 73 69 64 |characters insid| 000152d0 65 20 74 68 65 20 6d 65 73 73 61 67 65 73 0a 0a |e the messages..| 000152e0 09 8f 09 41 20 6d 65 73 73 61 67 65 20 6d 61 79 |...A message may| 000152f0 20 62 65 20 61 20 73 65 6c 65 63 74 69 6f 6e 3a | be a selection:| 00015300 20 73 74 61 72 74 73 20 77 69 74 68 20 61 20 94 | starts with a .| 00015310 25 3f 95 20 61 6e 64 20 63 6f 6e 73 69 73 74 73 |%?. and consists| 00015320 20 6f 66 20 61 20 63 6f 6d 6d 61 20 73 65 70 61 | of a comma sepa| 00015330 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 61 6c |rated list of al| 00015340 74 65 72 6e 61 74 69 76 65 73 0a 0a 0a 0a 0a 0a |ternatives......| 00015350 0c 0a 0a 41 70 70 65 6e 64 69 78 20 42 3a 20 52 |...Appendix B: R| 00015360 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f |egular expressio| 00015370 6e 73 0a 0a 42 2e 31 20 44 65 66 69 6e 69 74 69 |ns..B.1 Definiti| 00015380 6f 6e 0a 0a 41 20 72 65 67 75 6c 61 72 20 65 78 |on..A regular ex| 00015390 70 72 65 73 73 69 6f 6e 20 28 52 45 29 20 69 73 |pression (RE) is| 000153a0 20 61 20 66 61 6e 63 79 20 77 69 6c 64 2d 63 61 | a fancy wild-ca| 000153b0 72 64 69 6e 67 20 73 79 73 74 65 6d 20 97 20 69 |rding system . i| 000153c0 2e 65 2e 20 20 79 6f 75 20 64 6f 6e 91 74 20 6e |.e. you don.t n| 000153d0 65 65 64 20 65 78 61 63 74 20 6d 61 74 63 68 65 |eed exact matche| 000153e0 73 2e 20 20 41 20 72 65 67 75 6c 61 72 20 65 78 |s. A regular ex| 000153f0 70 72 65 73 73 69 6f 6e 20 69 73 20 72 65 61 6c |pression is real| 00015400 6c 79 20 61 20 6d 69 6e 69 97 70 72 6f 67 72 61 |ly a mini.progra| 00015410 6d 6d 69 6e 67 20 6c 61 6e 67 75 61 67 65 20 77 |mming language w| 00015420 69 74 68 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e |ith the followin| 00015430 67 20 94 63 6f 6d 6d 61 6e 64 73 95 3a 0a 0a 20 |g .commands.:.. | 00015440 20 20 20 20 20 20 20 2e 20 20 20 20 20 61 6e 79 | . any| 00015450 20 63 68 61 72 61 63 74 65 72 0a 0a 20 20 20 20 | character.. | 00015460 20 20 20 20 5e 20 20 20 20 20 73 74 61 72 74 20 | ^ start | 00015470 6f 66 20 6c 69 6e 65 0a 0a 20 20 20 20 20 20 20 |of line.. | 00015480 20 24 20 20 20 20 20 65 6e 64 20 6f 66 20 6c 69 | $ end of li| 00015490 6e 65 0a 0a 20 20 20 20 20 20 20 20 5b 2e 2e 2e |ne.. [...| 000154a0 5d 20 73 65 74 20 6f 66 20 63 68 61 72 61 63 74 |] set of charact| 000154b0 65 72 73 2a 0a 0a 41 6e 79 20 6f 74 68 65 72 20 |ers*..Any other | 000154c0 63 68 61 72 61 63 74 65 72 20 6d 61 74 63 68 65 |character matche| 000154d0 73 20 69 74 73 65 6c 66 0a 0a 54 68 65 72 65 20 |s itself..There | 000154e0 61 72 65 20 61 6c 73 6f 20 6d 6f 64 69 66 69 65 |are also modifie| 000154f0 72 73 3a 0a 0a 20 20 20 20 20 20 20 20 7c 20 20 |rs:.. | | 00015500 20 20 6f 72 2c 20 94 72 65 31 7c 72 65 32 95 20 | or, .re1|re2. | 00015510 6d 61 74 63 68 20 65 69 74 68 65 72 20 52 45 31 |match either RE1| 00015520 20 6f 72 20 52 45 32 0a 0a 20 20 20 20 20 20 20 | or RE2.. | 00015530 20 7e 20 20 20 20 6e 6f 74 2c 20 94 7e 63 95 20 | ~ not, .~c. | 00015540 6d 61 74 63 68 65 73 20 61 6e 79 74 68 69 6e 67 |matches anything| 00015550 20 62 75 74 20 74 68 65 20 6e 65 78 74 20 63 68 | but the next ch| 00015560 61 72 61 63 74 65 72 0a 0a 20 20 20 20 20 20 20 |aracter.. | 00015570 20 2b 20 20 20 20 6d 61 6e 79 2c 20 94 72 65 2b | + many, .re+| 00015580 95 20 6d 61 74 63 68 65 73 20 52 45 20 72 65 70 |. matches RE rep| 00015590 65 61 74 65 64 20 6f 6e 65 20 6f 72 20 6d 6f 72 |eated one or mor| 000155a0 65 20 74 69 6d 65 73 0a 0a 20 20 20 20 20 20 20 |e times.. | 000155b0 20 2a 20 20 20 20 72 65 70 65 61 74 2c 20 94 72 | * repeat, .r| 000155c0 65 2b 95 20 6d 61 74 63 68 65 73 20 52 45 20 72 |e+. matches RE r| 000155d0 65 70 65 61 74 65 64 20 7a 65 72 6f 20 6f 72 20 |epeated zero or | 000155e0 6d 6f 72 65 20 74 69 6d 65 73 0a 0a 20 20 20 20 |more times.. | 000155f0 20 20 20 20 3f 20 20 20 20 6f 70 74 69 6f 6e 61 | ? optiona| 00015600 6c 2c 20 94 72 65 3f 95 20 6d 61 74 63 68 65 73 |l, .re?. matches| 00015610 20 52 45 20 72 65 70 65 61 74 65 64 20 7a 65 72 | RE repeated zer| 00015620 6f 20 6f 72 20 6f 6e 65 20 74 69 6d 65 73 0a 0a |o or one times..| 00015630 50 61 72 65 6e 74 68 65 73 69 73 20 28 29 20 63 |Parenthesis () c| 00015640 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 67 72 |an be used to gr| 00015650 6f 75 70 20 52 45 73 0a 0a 46 69 6e 61 6c 6c 79 |oup REs..Finally| 00015660 2c 20 74 68 65 72 65 20 61 72 65 20 6d 65 6d 6f |, there are memo| 00015670 72 69 65 73 3a 0a 0a 20 20 20 20 20 20 20 20 5c |ries:.. \| 00015680 7b 20 20 20 73 74 61 72 74 20 72 65 63 6f 72 64 |{ start record| 00015690 69 6e 67 0a 0a 20 20 20 20 20 20 20 20 5c 7d 20 |ing.. \} | 000156a0 20 20 65 6e 64 20 72 65 63 6f 72 64 69 6e 67 2c | end recording,| 000156b0 20 61 6e 64 20 70 6c 61 63 65 20 69 6e 20 6e 65 | and place in ne| 000156c0 78 74 20 6d 65 6d 6f 72 79 20 28 73 74 61 72 74 |xt memory (start| 000156d0 73 20 77 69 74 68 20 31 29 0a 0a 20 20 20 20 20 |s with 1).. | 000156e0 20 20 20 5c 3c 6e 3e 20 5c 31 2c 20 2e 2e 2e 20 | \<n> \1, ... | 000156f0 5c 39 20 77 69 6c 6c 20 74 68 65 6e 20 6d 61 74 |\9 will then mat| 00015700 63 68 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e |ch the correspon| 00015710 64 69 6e 67 20 6d 65 6d 6f 72 79 0a 0a 2a 20 63 |ding memory..* c| 00015720 68 61 72 61 63 74 65 72 20 73 65 74 73 3a 0a 0a |haracter sets:..| 00015730 43 68 61 72 61 63 74 65 72 20 73 65 74 73 20 61 |Character sets a| 00015740 72 65 20 75 73 65 64 20 74 6f 20 6d 61 74 63 68 |re used to match| 00015750 20 6f 6e 65 20 6f 66 20 61 20 67 72 6f 75 70 20 | one of a group | 00015760 6f 66 20 63 68 61 72 61 63 74 65 72 73 2e 20 20 |of characters. | 00015770 41 6c 6c 20 63 68 61 72 61 63 74 65 72 73 20 61 |All characters a| 00015780 72 65 20 74 61 6b 65 6e 20 6c 69 74 65 72 61 6c |re taken literal| 00015790 6c 79 20 65 78 63 65 70 74 20 94 97 95 2c 20 94 |ly except ..., .| 000157a0 5d 95 2c 20 61 6e 64 20 94 5c 95 2e 20 20 54 68 |]., and .\.. Th| 000157b0 65 20 94 97 95 20 69 6e 64 69 63 61 74 65 73 20 |e ... indicates | 000157c0 61 20 72 61 6e 67 65 2c 20 75 6e 6c 65 73 73 20 |a range, unless | 000157d0 69 74 20 69 73 20 74 68 65 20 66 69 72 73 74 20 |it is the first | 000157e0 6f 72 20 6c 61 73 74 20 63 68 61 72 61 63 74 65 |or last characte| 000157f0 72 2c 20 6f 72 20 74 68 65 20 66 69 72 73 74 20 |r, or the first | 00015800 63 68 61 72 61 63 74 65 72 20 61 66 74 65 72 20 |character after | 00015810 61 20 70 72 65 76 69 6f 75 73 20 72 61 6e 67 65 |a previous range| 00015820 2e 20 20 54 68 65 20 94 5c 95 20 63 61 6e 20 62 |. The .\. can b| 00015830 65 20 75 73 65 64 20 74 6f 20 69 6e 63 6c 75 64 |e used to includ| 00015840 65 20 61 20 94 5d 95 20 6f 72 20 61 20 94 97 95 |e a .]. or a ...| 00015850 20 69 6e 20 74 68 65 20 73 65 74 2e 0a 0a | in the set...| 0001585e