SECTION E FILE INTRO.E SOME IMPORTANT KEYWORDS *********************** KEYWORDS Instructions are typed in to BASIC in the form of special ======== words which I shall call KEYWORDS. Some are the same as short English words ;PRINT, LIST, SAVE etc., whilst others are abreviations such as VAL (value of), GOSUB ( go to subroutine) REN (rename file). Keywords can be subdivided into COMMANDS and FUNCTIONS but this is of little importance to us at present. Keywords are valid and are used in the same manner in Direct Command and Program Input Modes. Learning the correct and various ways of using Keywords forms a large part of the mechanical side of programming in BASIC.(The other side of programming concerns artistry, style and individuality). In this section we shall only look at the few keywords that are used to operate the course program. Keywords can be typed in small or capital letters (lower or upper case) or a mixture of the two, and BASIC will automatically change them into upper case at the first opportunity. I always type keywords in lower case, because if a keyword is not changed into upper case then I know that I have made a syntax error concerning that word. The following results assume that the keyword is entered in Direct Command Mode and that [RETURN] is pressed. All typing can be in lower case. I have shown upper case for clarity. DIR This displays the disc directory, showing files on that side of --- the disc. This command also works in CP/M TYPE This command, followed by a space then a full filename prints --- out the named file. TYPE README.TXT will print the README.TXT file to screen provided that the file is in ASCII (plain English) format. If it is encoded it will print but make little sense. Scrolling can be controlled by the [f5] key. (see ALT+S, this file) LOAD To load a BASIC file called,say, MYFILE.BAS you type ---- LOAD "MYFILE" ,not forgetting the double quotes, or if the file has an extension other than .BAS (unusual), the whole name must be given. LOAD "MYFILE.ABC".This copies the file from the disc into memory. The original file remains on disc. The copy can then be run, examined, edited etc. RUN To run a program thus loaded, simply type RUN. Alternatively by --- typing RUN "MYFILE" you can do the job in one hit, copy MYFILE.BAS from disc and run it. GOTO This command, used in program input mode, is used to jump to a ---- specified line e.g GOTO 300. In this course you will often be asked to use it to run part of the course program. We always use RUN to start the program and we could use RUN 2000 to restart at line 2000. However RUN tidies up and clears out certain variables and definitions as part of it's job. This is not always desirable and can lead to problems ( try it yourself sometime !! ), so we use GOTO instead. LIST This will list the whole program as written. We more usually ---- use it to reveal a few lines at a time as; LIST 3200-3400. You got it ! this will list all lines from 3200 to 3400 inclusive. LIST -1000 lists all lines from zero to 1000, LIST 30000- lists all program lines from 30000 onward. Many times in this course this command is used from within the program, and when this happens, after the listing the program is dumped into Direct Command mode, but you are told how to start it again (usually with a GOTO) You are also invited to LIST pieces of program for inspection. LLIST Listing to the printer! Use the same type of commands as LIST ----- and you can very easily type out pieces of program ( or all of it if you wish). Very useful but make sure that your printer is supplied with paper. Read the section on use of the printer. STOP This command will interrupt the program and dump you back to ---- Direct Command mode at any time. ALT + S Not a command but used quite a lot when reading text or ======= scanning a BASIC program. I have use TYPE to call up text files from the BASIC program, but this leads to the problem that once the text starts it will scroll very quickly and be unreadable unless stopped at intervals. We can do this conveniently by depressing the ALT key and the S key at the same time. In practice it is easier to keep the ALT key depressed and 'toggle' the S key to turn the text scrolling on and off. ********** The same effect can be obtained by toggling the [f5] key alone and you may find this easier.********** End of file INTRO.E obtained by toggling the [f5] key alone and you may find this easier.******