| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- TURBO-LESSONS - A Pascal Tutorial Version 1.01 Page 10
- TURBO-LESSON 2: EDITING PROGRAMS
- OBJECTIVES - In lesson 2 you will learn about:
- 1. Starting an edit session
- 2. Ending an edit session
- 3. Moving the cursor to desired location
- 4. Inserting/replacing text
- 5. Deleting text
- 6. Auto-tabbing for readable programs
- TURBO-LESSON 2 uses a slightly different approach than most of
- the other TURBO-LESSONs. Much of the tutorial material of this
- lesson is in PROG2. PROG2 is not really a program, but a
- tutorial itself. After starting the editor with PROG2, you will
- learn to edit by editing PROG2 in ways suggested within the
- "program".
- ******* NOTE: BE SURE YOU HAVE A BACK-UP COPY OF THE TURBO-
- LESSONS AND SAMPLE PROGRAMS. MANY OF THE LESSONS WILL DIRECT YOU
- TO MAKE CHANGES IN THE PROGRAMS. A BACK-UP COPY WILL PROVIDE A
- NEW COPY OF THE ORIGINAL PROGRAMS WHENEVER THEY ARE NEEDED.
- 1. Starting an edit session.
- There are two ways to start an edit session. One way is to
- invoke the editor yourself when you wish to write a new program
- or modify an old one. The other way is automatic. When TURBO
- compiles your program and finds an error, it switches to the edit
- mode by itself and highlights the probable error. More about
- that later. This lesson covers only the first method. You start
- an edit session by typing E at the main menu.
- ##### DO:
- Type E.
- Computer responds: "Work file name:".
- Type PROG2.
- PROG2 will appear on the screen with the Editor "status line" at
- the top of the screen.
- Œ
- TURBO-LESSONS - A Pascal Tutorial Version 1.01 Page 11
- 2. Ending an edit session.
- One of the first things you learn when learning to drive a car is
- how to stop. When editing a program, you need to know how to
- get out of the editor and back to the main menu. To exit the
- editor and save the edited file, type ctrl-k followed by either d
- or ctrl-d. (Ctrl-k means: hold down the control key while
- depressing k). Note that the editor has no provision for
- abandoning an edited file - if you need to abandon a file, exit
- the editor and reload the work file from disk without first
- saving the edited version.
- ##### DO:
- Type ctrl-k, d.
- Computer responds: Main menu.
- 3. - 6. Objectives 3 to 6 are covered in PROG2. To begin,
- ##### DO:
- Type E.
- Computer responds: Edit session is started with PROG2.
- After working through the tutorial contained in PROG2, you may
- want to load and run PROG2A. PROG2A prints the cursor movement
- reference table referred to in the tutorial. To run PROG2A:
- ##### DO:
- Type W.
- Computer responds: "Work file name".
- Type PROG2A.
- Type R.
- PROG2A executes, printing a short summary of the cursor movement
- keys used by the TURBO editor.
- Œ
|