COUNT RETURN
If you want to know the number of words in part of the text only, set markers 1 and 2 before and after the part concerned type
COUNT 1 2 RETURN
It is important, however, to recognise what VIEW is doing when it counts words. It would be truer to say it was counting the spaces between the words. VIEW cannot read, so the only way it can discover a word is by the fact that words have spaces each side of them. So if you have typed 'WORD' it will recognise it as one word. If you have typed 'W O R D' VIEW will count it as four words, but if you are aware of how VIEW goes about this task, COUNT is a very useful facility.
As such it must be used with caution. It may be tempting to decide to use a narrower column, for example, and apply this throughout the whole text. All you have to do is set a shorter ruler, go into command mode and type:
FORMAT RETURN
However, you should check the text carefully before using FORMAT. Some parts of it may be unsuitable for formatting - for example where you have used a narrow column and insert side headings; or where you have a table which is not protected from the effects of formatting.
To limit the effect of the FORMAT command, you can set markers each side of the text to be formatted and type:
FORMAT 1 2 RETURN
For more information on the effects of TAB on formatting, see chapter 5 of this book.
The method of getting BASIC files into VIEW and back into BASIC again is as follows.
Place the disc (or cassette) containing the BASIC program in the drive (or cassette recorder).
Type: LOAD "(filename)" RETURN (To load the program)
Type: *SPOOL (newfile) RETURN (To create a new file)
Type: LIST RETURN (To put the program into it.)
Type: *SPOOL RETURN (To close the new file.)
Type: NEW RETURN (To clear text mode.)
Type: READ (newfile) RETURN (To read in the file.)
You can now edit the program and SAVE it back in 'newfile' or in another text file if you wish.
To use the edited version as a BASIC program
Type: *BASIC RETURN (To get into BASIC.)
Type: *EXEC (newfile) RETURN
The program is now in memory and can be listed and run in BASIC.
The point of all this routine is that VIEW cannot use BASIC files, so you have to create a file with the program in it which VIEW can use. This is done by using the *SPOOL command, which makes a file out of whatever is on the screen - and the program is placed on the screen by listing it.
The *EXEC command has the opposite function, of making a file which BASIC can use out of a VIEW text - which must of course be in the correct form for a BASIC program.
Two points are worth stressing:
- Always use READ, not LOAD or you will have a completely unusable column of text in VIEW.
- Lines of more than 132 characters cannot be used.