TEACH POPCOURSE1 - Getting Started

Welcome to TEACH POPCOURSE1. To work through this file you need to know how to make this text scroll up so you can read the paragraphs currently off the bottom of the window. The easiest way to do this is to drag down the scrollbar at the right of the window. This involves clicking down on the scrollbar with the mouse and then moving the mouse downwards. To make the text scroll down, simply drag the scrollbar up.

TEACH POPCOURSE1 is the first in a series of files that provide a self-contained course on POP-11 and Poplog. If you start at the beginning and work through to the end, completing all the exercises along the way, you should become a proficient user of POP-11 and the Poplog system. This file teaches you some basic Poplog skills that you will need to get through the rest of the course. As you go through the file you should take brief notes. These will help you to do the exercises at the end of the file.

Note that the commands etc. described below will only work if you are reading this file using the Poplog editor VED. When reading this document using a WWW browser (e.g., netscape) you cannot run any of the worked examples. However, by way of compensation, you have the advantage of being able to navigate around the files using the buttons that appear at the top and bottom of each page.


Using a command to find out the label on a key

Using Poplog is like using a word-processor (or an `editor'). On screen, you have a window containing text. By typing things on the keyboard and/or clicking with the mouse you can make things happen.

To make Poplog do certain things you have to issue a `command'. To do this you press a key called ENTER (usually labelled with the word `Enter'). This moves the cursor to a separate line just above the top of the text called the `command line'. This line has a little box at the left-hand end that contains the line number of the cursor. It also usually contains the name of the file you are looking at (in this case `teach popcourse1'). Once the cursor is on the command line, you type the command and press the RETURN key. This issues the command to the system.

One command you will certainly need to use is the one that takes you out of Poplog back to the computer operating system. This command is called `bye' and you should use it only when you have finished your Poplog session. If you issue this command by mistake (or as an experiment) you can get back in to Poplog with the command `xved'. You can then re-access this file by giving the command `teach popcourse1'.


Changing the text

A special feature of Poplog is that it behaves like a word-processor even when it is just giving you information, e.g. showing you this file. This means that you are allowed to actually change the text if you want. Poplog has its own copy of the file so any changes you make will only be temporary. A simple way to change the text is to delete some characters. You can do this using the DELETE key. When you press the DELETE key the character immediately to the left of the cursor should disappear. If the cursor was at the beginning of a line then it should move to the end of the line above.


Adding text

You can also type in new text. You do this by pressing the ordinary, `character keys' that you have in the middle of your keyboard. If you press the key marked `a' then an `a' will appear. If you hold down the key marked `Shift' and press `a', then an `A' will appear. And so on.

To place some text in a particular place in a file, just click down on the position move the cursor and then start typing. If you want to make some empty space to type into, then move to the end of a line and hit the RETURN key several times. This will push down the text below.


Operating on marked ranges

Many Poplog commands do things to paragraphs of text. To use one of these commands you first have to indicate where the paragraph (or `marked range' as it is called) actually is. This involves marking the range with the mouse, while holding down the `Control' key (sometimes marked `CTRL'). First press down the Control key, then click down the right button over the first line of the range and drag the mouse to the last line of the range. The range is now marked and you are ready to execute any command that operates on a marked range.

A simple command is `wcmr'. This displays a message giving the number of words in the range. The command `d' deletes all the text in the range (careful with this one!) and the command `j' tidies up the text so that all the lines are roughly the same length. (This is called `justifying' the text.)


Copying ranges from one place to another

If you accidently delete a range using the `d' command you can get it back by using the `y' command (`y' stands for `yank'). By deleting a range in one place and yanking it back in another you can effectively move a range from one location in the file to another. You might want to experiment with this a little to get the idea. (For people who have used a Macintosh-style interface, `d' and `y' are just like `cut' and `paste').

If you want to put a copy of a range in a new position, then use the `copy' command rather than `d'. Next time you use `y', the range you copied will be inserted.


Using the `g' command to jump to a section of a file

Files like the present one can be quite long. If you need to go back to a section much earlier in the file, it can be time-consuming to get there using the mouse. A better way involves using the `g' command. (`g' stands for `go'). When you issue this command, Poplog searches through the file for a contents listing. If it finds one, it puts the cursor on the first entry in the listing. To jump to a different section you just move the cursor to its entry in the listing and issue the `g' command again. Try using the command now to jump back to the section on `Copying ranges'. The contents listing appears immediately below so the first time you execute the command the cursor will only jump a little way.

Contents

If you find yourself working in a teach file that has no index, you can explicitly generate one with the command `indexify'.


Using the `/' command to jump to a particular word

A more straightforward way of jumping to a particular place in a file is to use the search command `/'. You execute this command by typing the slash `/' followed by some string of characters. Poplog then searches through the file from the current cursor position for the next occurrence of the character sequence. This command is very useful if you want to get to the place in the file that talks about a particular topic, but cannot remember where it is. By searching for the name of the topic (or for some word that is closely related to it) you should be able to jump right to it. If you wanted to jump to the information on leaving the system you could search for the word `bye' by giving the command `/bye'.


Making your own file with the `ved' command

To make effective use of Poplog you will need to be able to create and work on your own files of text. You can do this by using the `ved' command. `Ved' is the name of the word-processor part of Poplog. Thus, the Poplog commands described above are often called `Ved commands'. The `ved' command is effectively a way of telling Poplog to run the word-processor on one of your own files. All files have to have a name so when you give the command you should type the name of your file after the command; i.e., you should type something like

ved myfile
If you do not already have a file called `myfile', the `ved' command will create it for you. If you do already have a file of this name, the `ved' command will simply read that file in. (If you do not know the rules for file-names on the computer you are using, play safe and do not use any spaces or non-alphabetic characters in the name.)

Once you have issued this command you will find yourself in a new file that has no text in it at all. Everything about the Poplog word-processor will work just the same way it works in this file. However, because the file is your own file rather Poplog's, it will be saved automatically when you exit so that you can work on it again next time you run Poplog.

To get back into one of your files you use the `ved' command in exactly the same way you used to make the file in the first place. Thus, if you called your file `myfile' you could get back into it again by giving the command

ved myfile
To get back into a teach file, you give the `teach' command with the relevant file name after it. For example, to get back into this file you would do `teach popcourse1'.

Saved files are stored in your home directory (or folder) that is provided to you by the operating system. If you are using a UNIX operating system then, after you have exited from Poplog, you can ask the operating system to list out all your files by giving the `ls' command.

Try creating a file of your own now. Depending on the way your windows are working, you may still be able to see some of this file when you are working in your own file. Remember you can always get back into this file by giving the command `teach popcourse1'.

If you type a lot of text into your file, Poplog will sometimes beep and show a message that says `VEDAUTOWRITE'. This is Poplog automatically saving a copy of your file onto the computer's hard disk. This is done just in case the computer has a malfunction, which would cause you to lose any recently typed text. If you want to force Poplog to save a copy of the current file, give the command `w' (which stands for `write').


Printing your file

Normally, there will be a printer attached to the computer that you can use to print out files of your own. To print a file from within Poplog you first have to be working in it. If your file is called `silly' you have to do `ved silly' to run Ved on the file. Then you give a command like `print -p tpa' and Poplog will arrange for the file to be printed out on the printer called `tpa'.

If you want to print on another printer, substitute its name for `tpa'. To discover the location of a particular printer attached to your computer you have to read the documents provided by the computer support staff. Normally, the printer will be fairly near to the place where you use the computer.


Using the menus in xved

When using the Xved version of Ved, you will probably have a number of pull-down menus at the top of each window. The options these provide can be used instead of some of the commands described in this file. However, most people will find using the commands quicker.


Exercises

To test and extend your understanding of the Ved editor you should answer the following questions. First, copy them into a file of your own by (1) marking the whole range (2) executing the command `copy', (3) getting into your own file and (4) executing the command `y'. Edit in answers underneath each question and print out the file on the printer.

All the information you need to answer these questions is contained in this file. So, if you cannot work out the answer to a particular question work back through the file to find some relevant information.

  1. Does a marked range have to correspond to a paragraph?

  2. What happens if you try to press the DELETE key when the cursor is at the beginning of the very first line in a file?

  3. What happens if you execute the `g' command three times in a row?

  4. How is the `g' command affected if you remove the space at the beginning of an index entry?

  5. What happens if you give a command that is just a number (e.g. `42')?

  6. Mark a range of text and then issue the command `smr'. What has the command done? If the answer is not obvious, try it with another range of text. If the answer is still not obvious try the command on a range of numbers.

  7. What happens if you try to keep typing off the right hand edge of the window? What happens if you do the same thing without leaving any spaces between words?

  8. Create two files of your own and then try pressing ESC followed by `x'. What does this cause Poplog to do? What happens if you press the same keys again?

Quick reference

The following is a list of commands that you have been introduced to in this file. You may find it useful to copy them into a file of your own for easy reference.

/          command that searches for a given string of text
bye        command to leave Poplog
copy       command that takes a copy of a marked range
d          command that deletes a marked range
g          command that jumps to a section or to the index
j          command that tidies up a marked range of text
key        command to find out the label on a particular key
print      command that prints the current file on a given printer
ved        command that starts an edit on a new or existing file
wcmr       command that counts number of words in a marked range
y          command that yanks back a previously deleted (or copied) range
indexify   command that produces an index in a teach or help file

Moving on

If you have completed all the exercises successfully you can move on to TEACH POPCOURSE2. You can do this from within Poplog (or from the operating system) by giving the command `teach popcourse2'.

The next few files in the POPCOURSE series deal with POP-11 programming. If this material is not relevant to you, you can skip on to TEACH POPCOURSE10. This deals with the Poplog, online information system.


Page created on: Fri Apr 26 09:34:47 BST 2002
Feedback to Chris Thornton
hits this year