home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-19 | 73.8 KB | 1,474 lines |
- Chapter 2
- of the
- Turbo Pascal Reference
-
- The Integrated Development Environment
-
-
- This chapter is part of the Turbo Pascal Reference electronic freeware book (C)
- Copyright 1992 by Ed Mitchell. This freeware book contains supplementary
- material to Borland Pascal Developer's Guide, published by Que Corporation,
- 1992. However, Que Corporation has no affiliation with nor responsibility for
- the content of this free book. Please see Chapter 1 of the Turbo Pascal
- Reference for important information about your right to distribute and use this
- material freely. If you find this material of use, I would appreciate your
- purchase of one my books, such as the Borland Pascal Developer's Guide or
- Secrets of the Borland C++ Masters, Sams Books, 1992. Thank you.
-
-
-
- Using the Integrated Development Environment
-
- Turbo Pascal provides two independent methods of creating Pascal programs.
- You can use your own editor and the Turbo Pascal stand-alone compiler, or you
- can use the integrated development system that incorporates a powerful text
- editor, Pascal compiler, linker and debugging system all within a convenient
- and efficient framework for program development. This integrated system is
- called the Integrated Development Environment or IDE.
- From the user's standpoint, the IDE looks like a text editor that just
- happens to include a Compile command and associated Debug functions. This
- means you never have to switch gears - you type in your source, compile, fix
- errors and compile again without having to switch back and forth from the
- editor to the compiler. During program execution, the IDE provides a source
- level debugger. Using the IDE debugger, you can move the editor cursor to
- specific source lines and set break points to temporarily stop program
- execution, and then single step through the source, checking the values of
- variables in the Watch window. You can even change the values of variables
- during program execution.
-
- When to Use the IDE?
- Generally speaking, you will want use the IDE as much as possible.
- However, depending upon the size of your program and the amount and type of
- memory available on your computer, your application may exceed the constraints
- imposed by the IDE. If your computer has Extended Memory (EMS) RAM, the IDE
- will be able to compile and execute extremely large programs. If your computer
- has only 640k of RAM, you can still develop sizeable applications but you may
- encounter Out of Memory errors. When this occurs, you can separate the program
- into smaller units or use the standalone compiler package.
- The standalone compiler is included in the Turbo Pascal 6.0, 7.0 and
- Borland Pascal pacakges, and includes a compiler, linker and Make facility.
- Turbo Pascal 6.0 Professional and Borland Pascal also include the Turbo
- Debugger and Turbo Profiler (see Chapters 7 and 8 of the Borland Pascal
- Developer's Guide for details). The standalone compiler is described in
- Chapter 10, "Turbo Pascal Standalone Programs" of the Developer's Guide.
-
-
- Starting Turbo Pascal's IDE
- Assuming that you have installed the Turbo Pascal system into subdirectory
- \TP, as shown in this example, you will type Turbo to access the IDE:
- C:\TP> TURBO
- If you have installed Turbo Pascal to some other directory then be certain that
- you have either placed that directory into your DOS Path statement or that you
- have changed directories to that the Turbo Pascal directory.
- After initialization, the IDE displays a menu bar across the top of the
- screen, and a status line at the bottom of the screen. The following text
- describes the use of the Turbo Pascal 6.0 IDE; however, the Turbo Pascal 7.0
- and Borland Pascal IDE's are nearly identical. Some of the menu items have
- been slightly rearranged from Turbo Pascal 6.0.
-
-
- Selecting Menu Items
- You can select items from the menu bar in several ways. The easiest is to
- use the mouse; move the mouse pointer to the item you wish to select and click
- the mouse button. A pulldown menu of selections will appear and you can drag
- the mouse (by holding down the mouse button) to whichever selection you desire.
- Or, you can move the mouse pointer, without holding down any buttons, and then
- double click on the appropriate selection. Figure 2.1 shows the IDE menu bar,
- with the file Compile options menu dropped down below.
- Using the keyboard, you can access a pulldown menu by pressing the Alt
- key, and simultaneously pressing the highlighted letter of the menu item.
- Then,use the arrow keys to move the menu cursor up or down amongst the items.
- Pressing the Enter key selects the item that the cursor located on.
- You can also select pulldown menu items by pressing the keyboard key that
- matches the highlighted letter on the menu, or by pressing the short cut key
- shown to the right of some of the menu items.
- Lastly, if you prefer, you can access the menu bar by pressing the F10
- key. This highlights the File menu at the upper left. Use the left or right
- arrow keys to move the menu bar cursor to other menu bar selections. Pressing
- the Enter key causes the selected menu to be displayed.
-
- ***02tpr01.pcx***
- Figure 2.1. An illustration of the IDE, showing the Compile options menu
- overlapping an edit window.
-
-
- Editing, Saving and Compiling a Program
- To create a new program, select the New function from the File menu. An
- empty window will appear on the screen, with the title NONAME00.PAS centered in
- the upper window border. The text cursor will appear at the upper left corner
- of the window.
- You may now type a new Pascal program directly into the IDE editor. Since
- its become a tradition to learn a new language by writing a "Hello World"
- program, we'll do the same in this simple example:
-
- Program Hello;
- begin
- Writeln('Hello, world');
- end;
-
- After typing this program into the editor, you can save it by choosing Save As
- from the File menu. A dialog box will display asking you to enter the name of
- the file where this program should be saved. Type a program file name, and
- then either press the Tab key twice to reach the OK button, and press Enter.
- Or, you can use the mouse to double click on the OK button. Either way, the
- result is the same: your newly entered program is saved to disk.
-
-
- Dialog Boxes
- Dialog boxes are used throughout the IDE and all Turbo Pascal utilities
- for providing input and making selections. Dialogs contain several types of
- input controls, including:
-
- Input line or edit fields for typing in text responses
-
- Radio buttons for selecting just one item from a group of items
-
-
- Check boxes for enabling or disabling a large number of options
-
- Lists, for displaying, selecting and scrolling through lists of
- information
-
- Buttons, such as OK or Cancel.
-
- Most dialogs are modal dialogs meaning that while they are displayed you
- cannot perform any other function than to complete the dialog box. When the
- dialog is first displayed, the cursor is either visible in an input field, or
- some other highlight is used to indicate the current focus within the dialog.
- See Figure 2.2.
-
- ***02tpr02.pcx***
- Figure 2.2. Dialog boxes are used throughout the IDE to obtain user input.
- When you have finished entering or editing data in the dialog box, choose
- either the Okay or Cancel buttons to exit.
-
- For example, when the cursor is at a check box, you can see the cursor
- flashing between the brackets '[ ]' that delineate the check box selection.
- Generally, you press the Tab key to move between dialog box controls or use the
- mouse to click on a particular selection. However, groups of radio buttons and
- checkboxes are treated as a single control, so pressing the Tab key while
- within a group moves to the next control, and not the next selection within the
- group. Hence, use the arrow keys to move around within a group of radio
- buttons or check boxes, and use the Tab key to move from one control or group
- to another control or group. See Table 2.1 for a list of available dialog box
- controls and explanations for their usage.
-
-
- Table 2.1. Summary of Dialog Box Navigation and Usage
- Tab key
- Move forward to next control in sequence
-
- Shift-Tab
- Move backward to previous control in sequence
-
- Arrow keys
- Move between selections in checkboxes and radio buttons
-
- SpaceBar
- Select or deselect a radio button or checkbox item
-
- Enter key
- Select a button control
-
- Mouse click
- Enables or disables radio button and checkbox items, selects button
- controls,moves the current focus to the item clicked on.
-
- Highlight key
- Items that contain a highlighted key can be selected by pressing the
- highlighted key directly, which also moves the current focus to the
- selected item.
-
- Radio buttons
- Radio buttons allow one and only one item amongst a group of items to
- be selected. When you select a radio button by pressing the space
- bar, or with a mouse click, or by pressing the item's highlighted
- letter, any other selected radio button within the same group of
- radio buttons, becomes deselected. Within each group, only one
- button at a time can be selected, much like the radio station
- "preset" quick selection buttons on automobile radio receivers. See
- Figure 2.2 for an example of radio buttons.
-
- Checkboxes
- Checkboxes provide for enabling or disabling any number of items.
- Thecheckboxes are typically grouped together and you can use the
- arrow keys to move amonst them. Press the SpaceBar to select a
- checkbox item, or when the item is already selected, press the
- SpaceBar to clear the selection.
-
- Input fields
- Input fields allow you to enter aribtrary text information and to use
- the left and right arrow keys to move within the text, the Backspace
- and Delete keys to delete text, the Home key to move to the beginning
- of the field and the End key to move to the rightmost end of the
- field. Many of the fields provide horizontal scrolling, enabling you
- to type text wider than the displayed input field. When this occurs,
- either or both ends of the input field will display left and right
- arrows to show that more text exists on either side of the input
- area. Use the left and right arrow keys to scroll through the text,
- or click the mouse pointer on the arrows.
-
- List Boxes
- List boxes are used to select from a large list of items. See figure
- 2.3, showing the Open file dialog of the IDE. A typical use is for
- opening a file, where the contents of the disk directory are
- displayed in the list box. If there are more items than will fit
- within the list box, a scroll bar displays either on the bottom or
- the right hand side of the list box. To use a list box, use the Tab
- key to move the cursor to the list box, or use the mouse to click on
- an item within the list box. Once inside the list box, you can use
- the standard keyboard navigations keys to move around: the arrow
- keys, PgUp, PgDn, Home and End, and by pressing a single letter, many
- lists boxes will automatically scroll to the first item beginning
- with the letter that you pressed. Once the cursor is positioned on
- the correct in the list box, you can select the item by pressing the
- Enter key.
-
-
- ***02tpr03.pcx***
- Figure 2.3. The Open file dialog box uses a list box to display the files in
- the current directory.
-
-
- Use the Ins key to toggle between insert and overstrike modes. If you
- need to enter a control-key combination into an input field, you should prefix
- the control-key by pressing Ctrl-P and then the control-key you wish to enter.
- For example, to enter ^F into an edit field, type ^P^F.
- Lastly, some input fields provide access to previously entered values by
- displaying a history list. For example, when opening a file in the IDE, you
- may wish to switch back to the file that you had previously worked on. Input
- fields that allow you to do this display a downwards pointing arrow at the
- right most end. By selecting the arrow icon with the mouse, or by pressing the
- down arrow key, a small list box of previous inputs drops down below the input
- field where you can quickly choose data that was previously entered. Move the
- highlight bar to the desired item and press the Enter key, or use the mouse to
- select the item from the history list.
-
-
- Using the Editor
- The IDE's editor is where you will spend most of your time, typing new
- code, editing existing programs, and fixing program bugs or defects. You
- access the editor by selecting New from the File menu, or by opening an
- existing file, also from the File menu. Alternatively, you can open an
- existing file by specifying a filename on the command line when you first start
- the IDE by typing:
-
- C:\TP> TURBO SHELL.PAS
-
- which starts up Turbo and loads the existing program SHELL.PAS for editing.
- Borland Pascal users should type BP to access the Borland Pascal IDE.
- Once in the editor, a variety of keyboard commands, mouse movements and
- menu selections provide a full featured programmer's editing system. As you
- type text into the text editor window, the cursor moves across the screen and
- to the right. Press the Enter key when you have reached the end of your line,
- although the editor will scroll horizontally if you need to type source code or
- data files that are wider than the screen's width.
- Text entry can occur in either Insert mode or Overstrike mode. In Insert
- mode, new text is inserted in front of existing text, pushing it further along
- the line. In overstrike mode, text that you type is written over or replaces
- any other text at the cursor's location. You can toggle back and forth between
- insert and overstrike modes by pressing the Ins key (or for WordStar fans, by
- pressing Ctrl-V).
-
-
- Navigating in the Editor
- A horizontal scroll bar displays the current position of the file,
- relative to the start and end of its lines, and a vertical scroll bar displays
- the current position of the file, relative to the first and last lines in the
- file. Each scroll bar displays a square marker, which you can drag with the
- mouse to rapidly move to other locations in the file. To move line by line,
- press the up or down arrow keys, or click on the up or down arrow icons on the
- scroll bar. To page through the file, a screenful at a time, press the PgUp or
- PgDn keys, or click the mouse on the empty space between the scroll bar marker
- and the top or bottom of the scroll bar (or left and right sides if clicking on
- the horizontal scroll bar).
- Table 2.2 summarizes the editor keyboard commands. If you are familiar
- with older versions of WordStar, or Borland's SideKick, nearly all of the
- original ctrl-key combinations are also supported in the IDE and are shown in
- the table.
-
-
- Table 2.2. Editor Navigation Keystrokes.
- Up arrow or Ctrl-E
- Move up one line
-
- Down arrow or Ctrl-X
- Move down one line
-
- Left arrow or Ctrl-S
- Move left one character
-
- Right arrow or Ctrl-D
- Move right one character
-
- Ctrl-Left arrow or Ctrl-A
- Move one word to the left
-
- Ctrl-Right arrow or Ctrl-F
- Move one word to the right
-
- PgUp or Ctrl-R
- Move up one screen full
-
- PgDn or Ctrl-C
- Move down one screen full
-
- Home
- Move to beginning of current line
-
- End
- Move to the end of the current line
-
- Ctrl-W
- Scroll the screen up by one line
-
- Ctrl-Z
- Scroll the screen down by one line
-
- Ctrl-Home
- Move to the top of current edit window
-
- Ctrl-End
- Move to the bottom of the current edit window
-
- Ctrl-PgUp or Ctrl-Q-R
- Move to the beginning of the file
-
- Ctrl PgDn or Ctrl-Q-C
- Move to the end of the current file
-
- Ctrl-Q-B
- Move to the beginning of a selected text block
-
- Ctrl-Q-K
- Move to the end of a selected text block
-
- Tab or Ctrl-I
- Moves to the next tab stop on the line
-
- Ctrl-O-I
- Switches between tabs every 5 characters or every 8 characters. You
- can also set tabs to any value between 2 and 16 using the
- Options/Environment/Editor menu selection.
-
-
- Selecting Text and Text Block Operations
- By selecting text, you can perform operations such as Cut and Copy on
- entire text blocks. To select text with the mouse, move the mouse pointer to
- the start of the text block, and then, while pressing down on the mouse button,
- drag the mouse to the end of the text block that you wish to select. The text
- will be highlighted as you drag the mouse.
- Using the keyboard, you select text by pressing the Shift key, and then,
- while simultaneously holding down the Shift key, press keyboard navigation keys
- including the arrows, PgUp and PgDn. As you move the cursor with the Shift key
- depressed, your selection is highlighted.
- Text blocks may also marked by moving the cursor to the beginning of the
- block, pressing Ctrl-K-B, to mark the block's beginning, and then pressing
- Ctrl-K-K to mark the block's end.
- Turbo Pascal maintains a "clipboard" to which selected text can be cut or
- copied. When an item is Cut, it is deleted from the current file and placed on
- the clipboard. An item that is copied remains in the current file and a copy
- of the selection is placed on to the clipboard. Use Cut to delete text blocks
- or temporarly move them to the clipboard for later pasting to another location.
- Use Copy to duplicate text without deleting it.
- To choose either Cut or Copy, select the desired operation from the Edit
- pulldown menu or press the keystroke combinations shown to the right of the
- menu selections: Shift-Del to Cut the text, Ctrl-Ins to copy the text to the
- clipboard.
- The contents of the clipboard may be pasted to a new location, or even
- another file, by choosing the Paste command from the Edit menu, or by pressing
- Shift-Ins. Use the Show Clipboard command to look at the current contents of
- the clipboard.
- If you wish to cut out a section of marked text without copying to the
- clipboard, choose the Clear command from the Edit menu. Use caution: When you
- cut text with the Clear command, the text is gone forever - it is not copied to
- the clipboard and there is no way to undo this operation. One use of the Clear
- command is to select text within the Show Clipboard window itself, and then use
- Clear to selectively delete a portion of the Clipboard.
- The Editor also contains a set of WordStar compatible text block
- manipulation routines that perform similar functions to using the clipboard for
- block copying, moving and deleting. For example, when a text block is
- selected, you can move the cursor to some other location in the file, and press
- Ctrl-K-V and the selected text block will move to the location of the cursor
- and will remain highlighted. If you move the cursor and press Ctrl-K-C, a new
- copy of the selected text is inserted. Other block operations are shown in
- Table 2.3.
-
-
- Table 2.3. Table of Text Block Operations
- Shift-Del
- Cuts the selected text from the file and places it on the clipboard.
-
- Ctrl-Ins
- Places a copy of the selected text on to the clipboard.
-
- Shift-Ins
- Pastes the contents of the clipboard at the current cursor location.
-
- Ctrl-K-B
- Sets the current cursor location as the start of text block.
-
- Ctrl-K-K
- Sets the cursor location as the end of a text block. Using Ctrl-K-B
- and Ctrl-K-K, you can quickly delimit a large block of text. Move to
- the start of the block, press Ctrl-K-B, then move to the block's end
- and press
- Ctrl-K-K. The selected block will now be highlighted.
-
- Ctrl-K-H
- Turns off a selected block's highlighting; or turn's highlighting
- back on if the selected block's highlighting was turned off by a
- previous Ctrl-K-H.
-
- Ctrl-K-C
- Copies the selected text block to the current cursor location. To
- use this function, select a text block using any of the available
- methods (Ctrl-K-B and Ctrl-K-K, the mouse or Shift-direction keys).
- Then, move the cursor to the new location where you wish to make a
- copy of the selected text. Press Ctrl-K-C and the selected text will
- be copied to this location.
-
- Ctrl-K-V
- Like Ctrl-K-C, except that the entire block is moved from the old
- location to the new location indicated by the cursor.
-
- Ctrl-K-P
- Pressing Ctrl-K-P causes the selected text block to printed.
-
- Ctrl-K-W
- Use Ctrl-K-W to write the selected block to a disk file. After
- pressing Ctrl-K-W, a prompt will display asking for the destination
- filename.
-
- Ctrl-K-R
- Use Ctrl-K-R to read in a new file and insert it into the current
- file at the location of the cursor. After pressing Ctrl-K-R a prompt
- will display asking for the name of the file to insert.
-
- Ctrl-K-I
- Pressing Ctrl-K-I slides all of the selected text one space to the
- right. Use Ctrl-K-I and Ctrl-K-U, as needed, to adjust the
- indentation of program source.
-
- Ctrl-K-U
- Pressing Ctrl-K-U slides all of the selected text one space to the
- left.
-
-
- Specific Editing Commands
- Other editing command are provided for searching for specific text (see
- The Search Menu), and character, word and line deletion. Table 2.4 summarizes
- these other functions.
-
-
- Table 2.4. Editing Commands
- Del or Ctrl-G
- Deletes the character to the right of the cursor
-
- Backspace or Ctrl-H
- Deletes the character to the left of the cursor
-
- Ctrl-Q-Y
- Deletes from the cursor to the end of the line
-
- Ctrl-Y
- Deletes the entire line that cursor is on
-
- Ctrl-Q-L
- Restores a previously deleted line (from any of the delete commands)
-
- Ctrl-T
- Deletes the entire word to the right of the cursor
-
- Ctrl-N
- Inserts a blank line
-
- Ins or Ctrl-V
- Toggles between insert and overstrike typing modes
-
- Ctrl-O-I
- Toggles automatic indentation on or off
-
- Ctrl-Q-F
- Find command (See The Search Menu).
-
- Ctrl-Q-A
- Find & replace command (See The Search Menu)
-
- Ctrl-L
- Search again for last Find string (See The Search Menu)
-
- Ctrl-K-n
- Set marker #n at current cursor location (n is from 0 to 9).
-
- Ctrl-Q-n
- Jump to marker #n.
-
- Ctrl-Q-[ and Ctrl-Q-]
- When the cursor is located on a parenthesis, pressing one of these
- keystroke combinations will find and reposition the cursor to the
- matching parenthesis.
-
-
- The IDE Help System
- The IDE provides a convenient on-line help system, providing fully indexed
- help to both the IDE and the Pascal programming language. The IDE's help
- system is also context sensitive meaning that you can directly select help
- corresponding to the current menu or dialog selection, or even look up Pascal
- keywords based on the location of the cursor.
- To use Help, press Alt-H or select the Help item from the menu bar. You
- can obtain help as follows:
-
-
- Function Shortcut key
- Contents
- Display a book-like table of contents, organized by general subjects,
- such as "Editor".
-
- Index Shift-F1
- Displays a detailed index of every item in the help system. This
- includes every entry, including IDE functions as well as every Pascal
- language keyword, procedure and function, including the Turbo Vision
- object oriented windowing interface.
-
- Topic Search Ctrl-F1
- To look up information about a specific Pascal keyword, procedure or
- function, put the cursor somewhere on the the word for which you need
- help, and then choose Topic Search. The IDE Help system will
- immediately display a window of information about the keyword that
- the cursor is located on.
-
- Previous Topic Alt-F1
- The help system is a hyper-text system. Wherever you see highlighted
- text within the help text, if you click on the highlighted text, the
- help system will zip across to that subject heading. To return to a
- previous heading, choose Previous Topic.
-
-
- Copying Text from the Help system
- A unique feature of the IDE Help system is the ability to copy sections of
- text from the on-line help message and paste that text into the IDE Editor
- window. For example, if you are trying to match up a list of parameters in a
- function call, you can easily copy the function header from the help text and
- paste it right into your program. Many of the help items include sample
- program source which can be easily copied to your programs.
- To copy text, select the text from the help window, using either the mouse
- or the usual keyboard selection keys. Then choose the Copy option from the
- Edit pulldown. After closing the Help window, move to the appropriate location
- in the Editor window and choose Paste.
-
-
- The File Menu
- The File menu is used for getting existing program files, saving files to
- disk, creating new editor files, and printing.
-
- File Menu/Open
- To open an existing file, you can either specify the filename on the
- command line when you start Turbo Pascal, or you can use the Open command from
- the File menu. The Open command displays a standard file dialog, showing
- matching files in the current directory, and providing a prompt line where you
- can enter a new filename. Figure 2.3 shows the Open A File dialog.
- Like most dialogs, you can either use the mouse to click in a particular
- control, or use the Tab key to move from one control to the next. Normally,
- you will likely type the name of the file you wish to open, or press Tab to
- move to the Files listbox. In the list box, you can use the arrow keys - or
- the mouse - to point to a specific file - and then choose the Okay or Replace
- buttons to open the file. To move quickly through the Files listbox, use the
- PgDn or PgUp keys, mouse clicks on the scroll bar, or type single letter keys
- to quickly jump to the first filename beginning with that letter. Lower case
- letters will match to filenames, and upper case letters will quickly jump to
- subdirectory names.
- The difference between Okay and Replace is that when you choose Okay, the
- IDE will create a new editor window before opening the file. This let's you
- have multiple files visible in separate edit windows at the same time. If you
- choose Replace, the file will be loaded into the existing edit window, or if
- there are multiple edit windows, the file will load into the currently active
- window.
- When the dialog first appears, the cursor is initially located in the Name
- input field with the filename pattern *.PAS highlighted. You can delete this
- pattern by pressing any key and typing a specific filename, or you can type a
- new filename pattern using the standard DOS ? and * wildcard characters to
- display a new list of files in the Files list box. You can also change to a
- different subdirectory by typing the subdirectory pathname in the Name field;
- however, this only changes the default directory temporarily. Use the Change
- dir command on the File menu to change the default directory for the entire
- time that you are using the IDE.
- If you've previously opened other files, then the down arrow icon at the
- right of the Name field will display a list box showing the previous filenames.
- This is a quick way to reopen a file that you had used previously.
-
-
- File Menu/New
- Choose New to open a new, empty edit window and begin typing a new program
- file. The new edit window will have the default name NONAMExx.PAS, where xx is
- from 00 to 99.
-
-
- File Menu/Save functions
- To save the contents of an edit window to the disk, choose one of the Save
- commands: Save, Save as, or Save all.
- If you have been typing a new file, or wish to save the edit window to a
- new filename, choose the Save as menu item. At the prompt, you can enter a new
- filename where the contents of the edit will be saved.
- Choose Save to quickly save the active edit window to disk, using the name
- that has already been assigned to the file. If the edit window has the name
- NONAMExx.PAS, the IDE will automatically display the Save as prompt asking you
- to specify a unique name for the file. You can press F2 as a shortcut key, to
- perform a quick save while editing.
- The Save all menu item saves each and every one of the edit windows that
- have been modified.
-
- File Menu/Change dir
- Use Change dir to select a new disk drive and subdirectory to become the
- current working subdirectory. Change dir displays a dialog box with a prompt
- field for typing a new directory, and includes a list box display of the disk's
- subdirectory structure. You can choose a new name by typing the subdirectory
- name or by moving to the Directory Tree list box and selecting fromn the
- directories that are displayed. After selecting a new directory with Change
- dir, the new directory becomes the default directory.
-
- File Menu/Print
- Use the Print function to copy the contents of the active window to the
- DOS PRN: printer device (usually equivalent to LPT1:). If you wish to print
- only a subsection of text, first select the text and then use the Ctrl-K-P
- editor command keys
-
- File Menu/Get Info
- Choose Get Info to obtain information about the current IDE environment,
- including the size of the compiled code, the amount of memory required for data
- storage, the number of lines in the program's source, and the amount of low
- memory and EMS memory used by DOS and Turbo Pascal.
-
- File Menu/DOS Shell
- Choose DOS Shell to temporarily leave Turbo Pascal and return to the DOS
- command line prompt. From the DOS command line, you can use all of the
- standard DOS commands and even run other programs provided that they fit within
- the available memory. To return to Turbo Pascal, type Exit at the command line
- prompt.
-
- File Menu/Exit
- To exit from Turbo Pascal choose the Exit option or press the Alt-X
- shortcut key combination. If you have not saved any of the files that you have
- modified, Turbo Pascal will prompt you, asking if you want to have them saved
- before exitting.
-
- The Search Menu
- The Search menu provides functions for locating text quickly,
- automatically replacing existing text with new text, jumping to specific line
- in the text, and find the location of errors.
-
- Search Menu/Find (Ctrl-Q-F)
- To search through the current file, choose the Find option and type the
- text you wish to locate at the Text to find field. Press Enter to accept the
- default options, shown below the input field, and the IDE will quickly scan
- through the file looking for the text.
- By default, Find matches the text, ignoring the case of both the pattern
- and the text in the edit window. In other words, lower case text will match
- upper case text. Find also has a neat shortcut for text entry: In the Text to
- find field, pressing the right arrow key copies characters, one by one, from
- the current position in the edit window.
- The Find dialog presents a variety of options as to how the search will be
- performed. These options are shown in Table 2.3.
-
-
- Table 2.3. Find Dialog Options.
- Case sensitive
- If checked, any lower case letters that you enter in the search
- pattern will match only lower case letters, and upper case letters
- will match only upper case letters.
-
- Whole words only
- By setting this option, Find will only match an item if it appears as
- a separate word. If you look for the word "win" with this option
- set, you will only find occurrences of "win" as a standalone word,
- and you will not locate any occurrences of words like "window" or
- "winner".
-
- Regular expression
- Choose this option to enter a fairly complex "text searching
- expression", known as a regular expression. When this option is set,
- you can embed special characters into the search pattern that are
- interpreted according to the the following rules:
- ^
- Placing a circumflex at the start of the string forces the search
- pattern to only match items that begin at the start of a line.
- $
- The dollar sign is the opposite of the circumflex and forces the
- pattern to match items that fall at the end of a line.
- .
- Use a period to match any character value. This is equivalent to the
- DOS ? wildcard for matching any single character in the string.
- *
- The asterisk matches an entire string of characters (like the DOS *
- wildcard) and is used, for example, in looking for quickly matching
- any characters before or after a specific character set: CA* matches
- Call, California, Cauliflower and even just CA. The asterisk, unlike
- the + symbol, will even match if there are no characters following
- the primary search string.
- +
- Behaves like the asterisk, except that there must be at least one
- character for the + symbol. CA+ does not match CA but does match
- Call or California.
- [ ]
- Use brackets to specify a list of single characters that may appear
- in this position. For example, ABC[DEF] will match the following:
- ABCD, ABCE, ABCF, but not ABCG or any other character not including
- D, E or F in the 4th position.
- You can also search for a character match not appearing in the
- bracketed list by placing a circumflex as the first character.
- ABC[^DEF] means find all strings beginning with ABC and not ending in
- D, E or F.
- -
- To match a range of character values, place a hyphen between the
- first and last characters in the range. ABC[D-F] is equivalent to
- ABC[DEF] because this hyphenated list matches all characters
- beginning with D and up to and including F.
- \
- When you need to search for one of the special characters, ^, $, .,
- *, + or brackets, prefex the special character with the backslash.
- Example, /$ lets you search for the dollar sign character.
-
- Direction
- Choose Forward to search towards the end of the file or Backward to
- search towards the beginning of the file.
-
- Scope
- You can confine the search to just the area of text that is currently
- selected. Normally the search will take place over the entire text
- file or selection.
-
- Origin
- Choose From cursor to start the search at the current cursor
- location, or choose Entire Scope to search over the entire file or
- the entire selected region.
-
- Search Menu/Replace (Ctrl-A)
- Use the Replace command to replace existing text with new text. The
- Replace function displays a dialog box resembling the Find dialog box, except
- for the addition of a New text field, a Prompt on replace option, and a Change
- All button.
- To use Replace, type in text to search for at the Text to find field, a
- replacement string at the New text field, and then choose Ok. The default
- operation is to stop at each occurrence of the Text to find string and prompt
- to ask you if its okay to change this occurrence to the New text string.
- If you press the Change all button, then every occurrence of the Text to
- find string will be changed to the New text string value.
- The remaining Replace options behave the same as those in the Find dialog.
-
- Search Menu/Search Again (Ctrl-L)
- After completing a search or replace of an item, you can resume the
- previous search or replace by choosing Search again.
-
- Search Menu/Go to Line Number
- While you are editing, the line number that the cursor is on is displayed
- in the lower left corner of the editing window. Choose Go to Line Number to
- quickly jump to a specific line within the current edit window. Go to Line
- Number displays a dialog box with one input field asking for the line number.
-
- Search Menu/Find Procedure
- When you are running a program through the built-in IDE debugger, you can
- search for specific procedure declarations by procedure name. This function
- displays a dialog box asking for the name of the procedure. If, for instance,
- you type AddFiles as the procedure name to look for, Find Procedure scans
- through the edit window until find where AddFiles is defined. Find Procedure
- does not locate instances where AddFiles is called, but only where it is
- specifically defined.
-
- Search Menu/Find Error (Alt-F8)
- If, while running a program, a run-time error occurs, the IDE
- automatically places the cursor at the location in the source where the problem
- occurred. Later, during editing in the IDE edit window, to relocate the
- problem spot, choose Find Error and the cursor will again be placed at the
- location where the run-time error occurred.
-
-
- The Run Menu
- The Run menu provides options to start and control execution of your
- program. You can use the Run options after compiling the program (see the
- Compile Menu), or you can run the program directly by choosing Run. If the
- program has not been compiled since the last editing changes then it will be
- compiled for you.
- Run Menu/Run (Alt-R)
- If the program source needs compiling, the Run command will invoke the
- compiler. Then, your program will begin exeucution. You can press Ctrl-Break
- once or twice, as needed, to stop program execution. The IDE will then
- position the cursor at the location where the program was halted.
- If the program is temporarily stopped during use of the built-in debugger,
- choose the Run command to resume program execution.
- See also Run Menu/Parameters and Options Menu/Compiler, Memory sizes,
- Linker and Debugger for additional items that affect the execution of the
- program.
-
- Run Menu/Program Reset (Ctrl-F2)
- While using the debugging features of the IDE, you can completely halt and
- reset the program's execution by choosing this command from the Run Menu. Once
- selected, you can no longer resume execution except by choosing the Run command
- and restarting the program from the beginning.
-
- Run Menu/Go to Cursor (F4)
- At any time that you would use the Run command to start execution of your
- program, you can choose Go to Cursor to execute the program up to the location
- of the cursor in the IDE. Once execution reaches the cursor location, the
- program will stop and you can use the debugging facilities to observe the
- values of variables or continue debugging of the program. Alternatively, you
- could set a breakpoint (see Debug/Breakpoints) and Run the program until it
- halted at the breakpoint. The difference is that Go to Cursor is only a
- temporary breakpoint, while a set breakpoint remains until it is cleared.
-
- Run Menu/Trace Into (F7) and Step Over (F8)
- To single step execute through the source code, line by line, choose
- either the Trace Into or the Step Over commands. Trace Into and Step Over
- operate similarly except that Trace Into will continue to execute line by line
- as it enters lower-level procedures that the debugger has access to, and Step
- Over will call the procedure but will not trace through the procedure and will
- not halt until the next line after the procedure call.
-
- Run Menu/Parameters
- If your program makes use of command line parameters, you can use the
- Parameters command to set up the parameters for program execution. When the
- program is started, these parameters are available as if they had been typed on
- the DOS command line.
-
-
- The Compile Menu
- The compile menu is used to compile and link the executable program. See
- also the Run Menu and the Options Menu for items that can affect the
- compilation process.
-
- Compile Menu/Compile (Alt-F9)
- Use Compile to compile the current edit window. Use Build or Make or the
- Run menu's Run command when you also need to recompile other source files that
- will be used in the final link.
-
- Compile Menu/Make (F9)
- Use Make to compile and link a complete executable .EXE file. Make
- automatically checks and compiles, if necessary, any dependent program unit
- files (*.TPU), external object files (*.OBJ), and even included files within
- units. Whenever the Make function finds a source file that is older than the
- current compiled file (either the .OBJ or .TPU file), then those files are
- automatically recompiled so that their compiled form is brought up to date with
- the latest changes. Make is a "smart" function in that it only compiles those
- files that need to be compiled; unchanged units are not recompiled.
-
- Compile Menu/Build
- The Build command is like Make, except that Build recompiles every
- dependent unit, regardless of whether or not recompilation is needed. See also
- the Destination and the Primary File commands.
-
- Compile Menu/Destination
- Use this function to tell the IDE to either compile and link the program
- directly to memory, which is fastest, or to create an .EXE executable file on
- disk. Regardless of this setting, all units that create .TPU files are always
- compiled to disk. With either selection, you can run the program using the Run
- Menu/Run command.
- Also see Options Menu/Directories.
-
- Compile Menu/Primary File
- When writing programs that make use of several units and related include
- files, particularly when several of them are loaded simultaneously into
- multiple edit windows, you need to tell the compiler which of the files is the
- primary or main file. Use the Primary File command to mark which files is the
- main file that references all the others. The Make and Build commands
- reference this filename to determine which file owns which units, and to
- perform "smart" recompilation of the source.
-
-
- The Debug Menu and the Built-in Debugger
- The Debug menu provides access to the built-in debugging features of the
- IDE. In conjunction with the single step execution features on the Run menu,
- the built-in debugger let's you carefully step through your program, line by
- line, observing and changing variables as you proceed, and setting breaktpoints
- to stop execution and specific locations.
- Also see the Options/Compile and Options/Debugger features. The options
- values are set, by default, to enable use of the IDE's built-in debugger.
- However, its important that the Compiler Options be set to enable debugging
- information and usually, to retain local symbol information (see
- Options/Compile). Using the Options/Debugger command you should insure that
- the Debugging mode is set to "Integrated" mode (the standalone debugger is
- described in Chapter 9).
- The two features that will most often be used are the Breakpoints option,
- to set program stopping points, and the Watches function, to examine the values
- of variables. You can change variable values using the Evaluate/Modify
- command.
- Debug Menu/Evaluate/Modify (Ctrl-F4)
- Use this feature to evaluate an expression, referencing existing variable
- values, and optionally to assign new values to program variables during program
- execution.
- Evaluate/Modify displays a dialog box prompting for an Expression, and
- displaying the evaluated result in the Result field (which is also editable).
- You can type a new value or expression in the New value field and select the
- Modify button to update the contents of variable (must be a variable or array
- element) entered in the Expression field.
- The expression evaluator can format the results according to the format
- specifiers shown inTable 2-11. For arrays, you can specify a repeat count
- expression to enumerate many elements of the array by following the array or
- pointer name with a comma, and a repeat count expression. For example:
- XArray[0], 3
- displays the first 3 elements of XArray.
-
- Table 2-11
- Evaluate/Modify Format Specifiers
- , (comma)
- Is used following an array or pointer variable to specify a display
- repeat count. See the example given in the text.
-
- C
- Normally, ASCII characters in the range of 0 to 31 are displayed
- using the notation #nn to indicate which ASCII value is stored in the
- byte. By adding ,C after the expression, these values will display
- as actual characters.
-
- D
- Use ,D to display all integer values as decimal numbers.
-
- Fn
- Use ,Fn to change the default floating point digits display of 11
- digits to the number specified by n, where n is from 2 to 18.
-
- M
- By adding ,M after an expression, the value of the expression is used
- as a memory address (the expression must evaluate to a variable
- address or pointer reference as if it were being used on the left
- side of the := assignment operator). Normally, the ,M format will
- display one memory byte in Hex. However, by following ,M with one of
- the other format specifiers, you can display the following bytes as
- if they contain an integer, real, pointer or string value.
-
- P
- By default, pointer values are displayed as Ptr(segment, offset). By
- specifying ,P after the expression, the pointer value will be
- displayed as segment:offset.
-
- R
- Record variables are displayed showing the values of each field
- separated by commas. By adding ,R, the record is output to include
- variable names.
-
- S
- Forces string and character values in the range 0 to 31 ASCII to
- display as #nn. When used with the ,M format, S causes the memory
- bytes to be interpreted as a string.
-
- $, H, or X
- Displays all integer values as hexidecimal, such as $1A.
-
- Debug Menu/Watches
- Using the Watches function, you can add variables and expressions to a
- watch window, where their contents will be displayed at all times. Selecting
- Watches displays a sub menu containing Add Watch, Delete Watch, Edit Watch and
- Remove all watches. These functions are described below.
-
- Debug/Watches - Add Watch (Ctrl-F7)
- Choose Add Watch to type a new variable or watch expression to be added to
- the watch window. Typically you will type a simple variable name, such as
- Filename, or pointer reference such as List^.Name, or even a record name. You
- can also enter expressions, such as I*J or whatever is appropriate.
- In addition to the Ctrl-F7 shortcut key for adding watch values, if the
- Watch window is the active or focused window, you can press the Ins key to
- insert watch expressions, one after another.
-
- Debug Menu/Watches - Delete Watch
- When the watch window is the active window, you can delete individual
- watch expressions by moving the cursor to the item to be deleted and choosing
- the Delete Watch item, or pressing either the Del or Ctrl-Y keys.
-
- Debug Menu/Watches - Edit Watch
- To change an existing watch expression, choose Edit Watch and type the new
- expression in the Edit Watch dialog prompt. For fastest access, just move the
- cursor over an existing watch expression in the Watch window and press the
- Enter key. This immediately displays the Edit Watch window.
-
- Debug Menu/Watches-Remove all Watches
- Use Remove all Watches to erase the contents of the Watch window.
-
- Debug Menu/Toggle Breakpoint (Ctrl-F8)
- To set a breakpoint, choose Toggle Breakpoint. If the cursor is on a
- highlighted line already containing a break point, choosing Toggle Breakpoint
- clears that breakpoint.
-
- Debug Menu/Breakpoints
- The Breakpoints command is used to edit or add breakpoints to the list of
- currently active breakpoints, to delete breakpoints or to quickly locate and
- view the source code where a breakpoint is set. The Breakpoints command brings
- up a dialog box showing the current list of breakpoints (the line number where
- its set and any conditions assigned to the breakpoint), and a set of buttons to
- perform operations on the list.
-
- Edit Breakpoints Button
- Choose the Edit Breakpoints button to change an existing breakpoint or to
- add a new one. Edit Breakpoints displays a subdialog on top of the Breakpoints
- dialog with the following fields:
-
- Condition field: You can enter a conditional test in this field, such as
- I>10, which limits the breakpoint to having an effect only when the
- variable I is greater than 10.
-
- Pass count: By entering a value in the Pass count field, the break
- point will be skipped this number of times before actually stopping at
- the break point. This feature is especially useful when debugging items
- in the middle of a loop.
-
- Filename: This is the name of the source file that contains this
- breakpoint.
-
- Line number: Specifies the line number at which the break point is
- located.
-
-
- Delete Button
- Within the list of breakpoints, move the highlight bar cursor to the
- breakpoint you wish to delete, and then choose the Delete button. Note that
- the Breakpoints dialog has no Cancel button so that any breakpoints you clear
- are gone for good.
-
- View Button
- To locate a specific breakpoint's source code, point to the breakpoint in
- the breakpoints list and select the View button. This switches the active
- window to the file containing the breakpoint and displays the source line where
- the breakpoint is set.
-
- Clear All Button
- Use Clear All to erase all breakpoints from the program.
-
-
- The Options Menu
- The options menu provides a way to set compiler, linker, and debugger
- options, and to establish default directories and memory allocations. You can
- also customize various features of the IDE, including startup defaults, color
- selections, mouse behaviour and so on.
-
- Options Menu/Compiler
- The Compiler Options are shown in Table 2.4 Many of these options can
- also be set using imbedded $ comment directives. $ comnment directives are
- place inside your Turbo Pascal source, as a comment. By beginning the comment
- with a $ character, a compiler option character, and then optional parameters,
- you can turn various features on or off throughout the program's compilation.
- For example, to enable range checking, so that the compiler will check on array
- indices before use to insure that they fall within the bounds defined for the
- array, you would insert a comment into your program's source, like this:
- {$R+}
- To disable range checking, you type {$R-}. Using this feature, you can
- selectively enable and disable features at various places in the program. In
- general, following the compiler directive with a + plus symbol to enable the
- feature and a - minus symbol to disable the feature, or, for item requiring a
- numeric parameter, follow the compiler directive with the value of the
- parameter.
-
-
- Table 2.4. Compiler Options.
- Force far calls ($F compiler directive)
- Normally, the compiler generates near calls for all procedure and
- functions in the current file. You can force far call generation by
- selecting this option.
-
- Overlays allowed ($O compiler directive)
- You must set this option for all units that will subsequently be
- overlaid. Its also okay to set this option for units that are not
- overlaid as it merely adds some additional run time checks to the
- generated code.
-
- Word align data ($A compiler directive)
- Normally, the compiler generates byte aligned data assignments.
- Setting this option forces the compiler to generate word aligned
- assignments, so that if one value ends on an odd byte, the compiler
- will skip a byte to insure that the next assignment is made to an
- even byte position. The 80x86 CPUs, including the 8086, operate
- slightly faster when fetching word-aligned data than when fetching
- byte aligned data.
-
- 286 instructions ($G compiler directive)
- Compiles using the 80286 instruction set. Programs created with this
- option will not run on 8088 or 8086 processors.
-
- Range checking ($R compiler directive)
- Range checking can be performed on all array and string subscript
- values. If the index is out of range, then a run time error occurs
- and the program halts. Set this option to enable range checking, and
- clear this option to disable range checking. Programs may run
- noticeably faster with range checking turned off.
-
- Stack checking ($S compiler directive)
- When this option is set, the compiler generates extra code for every
- procedure and function call to insure that adequate memory remains in
- the stack area. If the call would cause the program to run out of
- memory, the program is halted with a run-time error.
-
- I/O checking ($I compiler directive)
- The default setting is to have the compiler check for input/output
- errors on all input/output operations, such as reading or writing to
- a file. However, usually you will want to have your own checks for
- such errors so you will want to disable this option, or use the $I-
- compiler directive to locally disable I/O checking. You can then
- check the value of the IOResult function to determine if an error
- occurred.
-
- Strict var-strings ($V compiler directive)
- Most Pascal compilers will not let you pass a string variable as a
- VAR parameter unless both VAR parameters are exactly the same type
- and length. For example, you normally cannot pass a STRING[80] typed
- variable to a procedure having a VAR parameter defined (via a type
- declaration) as STRING[128]. However, clearing this option, Turbo
- Pascal will allow you to pass mismatched string types.
-
- Complete Boolean evaluation ($B compiler directive)
- The Turbo Pascal compiler normally performs short-circuited boolean
- expression evaluation. This means that, as the expression is
- evaluated at run time, as soon the result is definitely known the
- remainder of the expression will be ignored. This is particularly
- useful in testing an index value before using it in an array
- subscript, in for example,
- if Index < 10 and (X[Index]=9) then...
- If Index is 10 or greater, the program will not execute the array
- subscript. However, by enabling this compiler option, you can force
- the program to always fully evaluate the expression. This might be
- used when calling a function within an expression, and your program
- must use an intended side affect of the function call.
-
- Extended syntax ($X compiler directives)
- When this option is set, Turbo Pascal will let you call a function
- just like it was a procedure. In effect, the result of the function
- will be ignored and thrown away. This feature does not apply to any
- System unit functions.
-
- 8087/80287 ($N compiler directive)
- When set, this results in the compiler generating code for the 8087
- or 80x87 math coprocessor chip. This option is often used in
- conjunction with the Emulation mode option; see below.
-
- Emulation ($E compiler directive)
- When this option is set, the compiler will link in routines that
- automatically detect the prescence or abscence of the floating point
- processors. If the math processor is installed, then it will be
- used; if the math processor is not installed, the routines that
- simulate the processor are called instead. To generate code for all
- types of machines, regardless of whether or not they have a floating
- point chip, select both the 8087/80287 and the Emulation options. If
- you know that the target machine definitely has a coprocessor, then
- disable this option but enable the 8087/80287 option.
-
- Debug information ($D compiler directive)
- If you are going to use either the built-in or the standalone
- debuggers, set this option on so that the compiler will generate
- internal line number tables to assist in matching generated code to
- program source statements. You can selectively disable debug
- information on a per unit basis; such units cannot have their
- procedures or functions traced into.
-
- Local symbols ($L compiler directive)
- This option should be set so that the compiler builds a table of all
- local variables and constant identifiers. You can then refer to
- these during a debugging session.
-
- Conditional defines
- In Turbo Pascal programs, you can conditionally compile sections of
- the program depending upon the settings or definition of certain
- symbols. A common use is to create an identifier called Debug.
- Special debug code is then inserted into the program source,
- surrounded by the conditional compilation instructions, {$IFDEF
- Debug} and {$ENDIF}. If Debug is defined in a $DEFINE statement,
- then the code is generated. If Debug is not defined, such as when
- the program has been completed and thoroughly tested, then the
- special debugging code will not be generated as part of the final
- executable. Use this input field in the Compiler Options box to
- define any particular symbols that your program references. Multiple
- symbols may be separated by semicolons. Important note: Symbols
- used as part of the $IFDEF check are not the same as symbols used as
- program constants and variables.
-
- Options Menu/Memory sizes
- The Memory sizes dialog displays prompts for Stack size, Low heap limit
- and High heap limit. You can enter new values that are appropriate for your
- program. For example, the TVSHELL program described in the Borland Pascal
- Developer's Guide, Chapters 11-12, "Turbo Vision Tutorial" loads and executes
- other programs. If the High heap limit is set to the maximum default value, no
- memory would be available to load and execute another program. Many programs
- can execute with a relatively small heap, which is the area that dynamic
- variables are allocated from, and this limit can be safely set to a small value
- such as 8 or 16k.
-
- Options Menu/Linker
- On the Linker options dialog, you can indicate if you wish to produce a
- link map file, showing where each unit has been placed in the executable.
- Select one of the options Segments, Public or Detailed, or specifiy no link
- file by selecting Off.
- The linker normally links programs using a memory based buffer. However,
- for large programs you may need to select a disk based buffer, which is slower,
- but can accomodate much larger programs. Select either the Memory or the Disk
- radio button to choose the correct setting for your programs.
-
- Options Menu/Debugger
- Use this dialog to specify which debugger you plan to use: either select
- the Integrated debugger, which is the default, or choose the Standalone
- debugger.
- You may also select the type of display swapping in effect. If you are
- using a second monochrome monitor for debugging output, the Display swapping
- settings are ignored. Otherwise, the none selection causes the debugger to
- maintain control of the screen at all times. The default setting, Smart,
- causes the screen to display your program's output every time a procedure call
- is made or any time that it believes an I/O will occur to the screen. When the
- program encounters a break point or error, control returns to the debugger.
- Lastly, the Always selection forces the screen to swap back and forth between
- the debugger and the program at every statement execution. Generally, you will
- want to use the Smart swapping mode of operation.
-
- Options Menu/Directories
- The directories dialog specifies the location of various files. Values
- should be entered as follows:
-
- EXE & TPU Directory
- Enter the name of the subdirectory that will contain all created .EXE
- and .TPU files. Leave this field blank if you want to store these
- files at the same location as where the source is found.
-
- Include directories
- If this field is blank, include files will be read from the source
- file directory. Otherwise, you can specifiy a different directory or
- directories where the compiler should look for the included source
- files. By separating directory names with a semicolon, you can enter
- a large number of directories, each of which will be searched by the
- compiler.
-
- Unit directories
- Like the Include directories field, you can type multiple
- subdirectory names to be searched by the compiler and linker when
- accessing program units. Multiple directory names should be
- separated by semicolons.
-
- Object directories
- If you reference assembly language routines in your program, specify
- the location of the *.OBJ files using this field. Again, multiple
- directories may be entered by separating each name with a semicolon.
-
- Options Menu/Environment
- Choose this selection to set a variety of parameters including 25 or 43/50
- line modes. A submenu containing Preferences, Editor, Mouse, Startup and
- Colors items is displayed.
-
- Options Menu/Environment - Preferences
- Use the Preferences dialog to choose:
-
- Use the Screen sizes option to select 25 or 43/50 line modes (CGA is
- always 25 lines only, EGA is 43 lines and VGA is 50 lines);
-
- Use the Auto Save selections to choose automatic saving of modified
- editor files each time the Run command is given; To choose automatic
- saving of all environment selections when you exit the IDE; and to
- choose saviing of the desktop so that it the desktop will be restored
- upon return to the IDE.
-
- Use the Source tracking option to specify how source files should be
- loaded when in debug mode or when a run time error occurs. For example,
- if you are single stepping into a procedure whose source is not
- currently loaded, the IDE will read in that source file. If you have
- selected the New window option for Source tracking a new window is
- created and the file loaded into that window. If the Current window
- option is chosed, then the contents of the top most window are replaced
- with the new file.
-
- Use the Desktop file options to specify that the TURBO.DSK desktop file
- be saved in either the Current directory or to the Configuration file
- directory, which is whatever directory contains the TURBO.TP
- configuration file.
-
- Options Menu/Environment - Editor Options
- Select Editor options to specify any of the following:
-
- Create backup files: If set, any file that you edit will retain the
- immediately preceding version in a file having the same filename but a
- .BAK extension.
-
- Autoindent mode: If set, the IDE editor provides an intelligent,
- automatic indenting feature to ease typing the standard indentation used
- in Pascal source.
-
- Use tab characters: Normally, the IDE editor converts tabs to spaces.
- However, if this option is set, then the editor inserts an actual ASCII
- 9 tab character into the text. See Tab size, below.
-
- Optimal fill: If this option is set, leading blanks on each line are
- converted, if possible, to a combination of ASCII 9 tab characters and
- spaces. See Tab size, below.
-
- Backspace unindents: If set, this option operates roughly the opposite
- of the automatic indent feature. When you backspace, the cursor will
- move to the preceding indent level. This is especially useful when
- entering lots of nested begin - end statements.
-
- Cursor through tabs: If the Use tab characters option is set, and ASCII
- 9 tab characters are being inserted in the text, then and only then does
- this option apply. When ASCII 9 characters are embedded in the text,
- pressing the left or right arrow key moves across the entire gap of
- blanks that may appear at the site of an ASCII 9 character. If the
- Cursor through tabs option is set to true, the cursor key will advance
- across the ASCII 9 as if it was a group of blank characters.
-
- Tab size: Tab size specifies how far apart, in characters, the tab
- positions are located. The default value is 8 but may be set to any
- value from 2 to 16.
-
-
- Options Menu/Environment - Mouse
- Use the Mouse options dialog to set a function from the right mouse button
- (Nothing, Topic search, Go to cursor, Breakpoint, Evaluate or Add watch), to
- select reversal of the left and right mouse buttons (especially useful if you
- use the mouse with your left hand). Using the Mouse options dialog, you can
- also set the mouse double click rate by sliding a marker across a scroll bar
- ranging from Slow to Fast.
-
- Options Menu/Environment - Startup
- This dialog controls a variety of IDE start up options. In addition to
- specifying start up options here, you can append the command line switches
- shown below when you first start the IDE by typing, for example,
- TURBO /D+
- where a + following the switch is equivalent to setting that option on, and a
- minus "-" is equivalent to turning the option off.
-
- Dual monitor support (/D): Set this option if you have both a graphics
- monitor for user program output and a monochrome monitor for debugging
- information output. You can switch which monitor is the debugging
- monitor using commands appropriate for your computer, before you start
- running Turbo Pascal.
-
- Graphics screen save (/G): If set, an additional 8k of RAM will be
- allocated to a buffer used for saving all of graphics memory while
- debugging programs that operate in graphics mode.
-
- EGA/VGA palette save (/P): This function is useful when your program
- manipulates the palette registers of the EGA and VGA video cards. If
- set, the IDE will restore the registers to their original values each
- time the screen switches between user output and debug output.
-
- CGA snow checking (/N): Some of the original CGA adaptors used single
- ported memory, where the video circuitry and the CPU would sometimes
- interfere with one another's access to the CGA video memory and produce
- a flicker effect referred to as "snow". If you are using a CGA monitor
- that experiences snow, this option should be set on (it is set by
- default). However, if your monitor does not experience snow, you should
- turn this option off. Monitors that do not display snow will have
- faster output with this option disabled.
-
- LCD color set (/L): If you are using the IDE on a typical lap top
- computer with an LCD screen, you should select this option to provide a
- more readable display.
-
- Use expanded memory (/X): If you have installed an EMS driver and have
- EMS memory available, Turbo Pascal will automatically attempt to use the
- EMS memory. The use of EMS will substantially improve the performance
- of Turbo Pascal, particularly when working with very large programs.
- Youcan also use the /S option to specify a RAM disk or other fast disk
- area where Turbo Pascal can locate its swap file.
-
- Load TURBO.TPL (/T): By turning this option off, you can increase the
- memory available for compiling, as long as you then link in the
- SYSTEM.TPU unit.
-
- Window heap size (/W): The window heap size specifies, in k bytes, the
- amount of RAM reserved to manage the windows on the desktop. If you do
- not normally open multiple files, you can reduce the memory allocation.
- Values may be in the range from 24k to 64k.
-
- Editor heap size (/E): The default value of 28k is sufficient for most
- users especially if you are using a RAM disk, EMS or a fast hard disk..
- However, if you are swapping to a slow disk, you should set this to a
- much larger value, as needed, between 28k up to 128k.
-
- Overlay heap size (/O): The overlay heap size can be adjusted between
- 64k and 256k. If you are using EMS, you can enlarge the amount of
- memory available for compiling by reducing this to 64k with no
- degradation in performance.
-
- Swap file directory (/S): If you are not using EMS, you can specify the
- location of the swap by typing in the directory where the file should be
- created. See Use expanded memory, above.
-
-
- Options Menu/Environment - colors
- Use the colors dialog to select different colors, both foreground and
- background, for each component in the IDE. Selecting colors is a fairly
- cumbersome undertaking because of the large variety of components and possible
- color choices. If you elect to use this feature, you will probably want to
- change the colors on only a few items.
-
- Options Menu/Save options
- Use Save options to specify where the name and location of the TURBO.TP
- configuration file (you can create different and multiple configuration files
- if you wish). Use the Retrieve options dialog to reload a previously saved
- configuration file.
-
-
- The Window Menu
- Use the Window pulldown menu to manage the display of the IDE windows.
- From this pulldown, you can select between the active user program screen or
- the debugger screen, as well as access a variety of other windows and
- functions. Some of the functions such as Size/Move are directly accessible
- using the mouse and are presented on the Window menu so that keyboard-only
- users can perform the same functions.
-
- Size/Move (Ctrl-F5): To move the active window, select Size/Move and
- then use the arrow keys to drag the window. If you press Shift-arrow
- keys, you can change the window's size. Press Enter when you are
- finished making your adjustments, or press the Esc key to abandon your
- changes. If you are using a mouse, you can move a window by clicking
- and dragging on the window border, and you can adjust the windows size
- by clicking and dragging on the lower right corner.
-
- Zoom (F5): Zooming is the action that takes place when a small window
- is enlarged to cover the entire desktop. You can zoom a small window to
- maximum size by selecting this function, or you click the mouse on the
- up arrow located at the upper right corner of the window, or by double
- clicking on the top most line of the window (other than on the close
- icon).
-
- Tile: The tile function arranges the windows as if they were tiles on a
- floor; each window is sized and positioned so that all the windows can
- be seen at the same time with no overlapping windows, hence the name
- "tiling".
-
- Cascade: When windows are cascaded, instead of tiled, the windows are
- overlapped so that other than the top most window, each of the windows
- shows only its upper border and left side border peeking around from
- behind. You can select a window by clicking on it with the mouse or by
- using the Next command on the Window menu.
-
- Next (F6): Use Next and Previous to cycle through the list of windows,
- making the next or previous window in the display become the active
- window.
-
- Previous (Shift-F6): See above.
-
- Close (Alt-F3): To close a window, click on the window's close icon in
- the upper left corner, or make the window active and choose the Close
- function.
-
- Watch: If you have previously closed the Watch window, or if it has
- become hidden behind another window, select Watch to make the Watch
- window visible on the display.
-
- Register: Select Register to make this window, a display of CPU
- registers and their contents, visible on the screen.
-
- Output: Output opens a small window (whose size can be increased)
- displaying output from any DOS commands you may have executed by
- shelling to DOS (from the File menu). If your program generates simple
- text output using Writeln's, this output too can be seen in the Output
- window. If you are debugging a 25 line output application within a 50
- line VGA display, you can see both your program's output and the
- debugger information at the same time.
-
- Call stack (Ctrl-F3): Displays a list of procedures or functions called
- (and currently active). You can use this procedure list to quickly jump
- to the corresponding source code by moving the highlight bar up or down
- with the arrow keys, so that it points to the item of interest, and
- pressing Enter. The edit window will then jump to the location where
- the procedure where was called.
-
- User Screen (Alt-F5): This function switches the entire screen to show
- your program's output only and is used frequently during debug sessions.
- Press any key or click the mouse to return to the IDE.
-
- List (Alt-0): Displays a window containing a list of every active
- window on the IDE desktop. You can jump directly to any of the windows
- by selecting or clicking the desired item.
-
-
-