home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / PASTUT34 / TUTORHLP.HLP (.txt) < prev    next >
Borland Turbo Vision Help  |  1993-01-15  |  22KB  |  304 lines

  1. FBHF?T
  2.  Turbo Pascal Tutor and Examples 
  3. Welcome to Turbo Pascal Tutor.  This program allows notes on Turbo Pascal to be viewed in a scrollable window, whilst the source code for a number of examples can also be inspected. These example programs can be run as executable files (.EXE) from the tutor screen. The 
  4.  menu is accessed by pressing Alt-Space.  All the other menus are accessed by pressing Alt-Z, where Z is the first letter of the menu. For example, the "Notes" menu is pulled down by Alt-N. )
  5. Press ESC to put this help screen away. 
  6.  File viewer 
  7. A file viewer views the contents of a text file. You can use the arrow keys to move about in the file. A file is loaded via the File
  8. Open menu item. a
  9.   Up         Move up one line
  10.   Down       Move down one line
  11.   Right      Move right one column
  12.   Left       Move left one column
  13.   PgUp       Move one page up
  14.   PgDn       Move one page down
  15.   Home       View right most column of the file
  16.   End        View left most column of the file
  17.   Ctrl-PgUp  View top of file
  18.   Ctrl-PgDn  View bottom of file.
  19. File viewers can be resized and moved using the Windows menu. 
  20.  List 
  21. Selecting List from the Notes sub-menu provides a screen window containing an alphabetical list of text files covering many Turbo Pascal topics, with a brief description of the contents. After observing the filename required, press Alt-F3 to leave this screen display and then select Open to obtain a Dialog Box for selection of the reqired file. 
  22.  List Open 
  23. Select the required file from the Dialog Box by pressing the Tab key and then using the arrow keys to move to the appropriate file. Then press the ENTER key. 
  24.  Example Code 
  25. On selecting Open a list of Pascal source code files is presented for selection of the required file by pressing the Tab key and using the arrow keys to move to the appropriate file. The ENTER key should then be pressed. 
  26.  Graphics 
  27. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key G. z
  28. The program illustrates the graphics capabilities of Turbo Pascal, by using the Line procedure with a suitable algorithm to draw a parabola. Apart from using the Graph unit of Turbo Pascal, a GraphPRN unit is employed to allow hardcopy to an Epson printer. This latter unit is listed by Ohlsen and Stoker in 'Turbo Pascal Advanced Techniques' published by the Que Corporation. 
  29.  (System) menu 
  30.     (Alt-Spacebar)
  31. The System menu appears on the far left of the menu bar and is represented by the 
  32.  symbol. (
  33. When you pull down the 
  34.  menu, you see     
  35.   About
  36. About 
  37. When you choose the About command from the 
  38.  (System) menu, a dialog box appears, showing copyright and version information. >
  39. To close the box, press Esc, or click the top left symbol 
  40.  Records 
  41. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key R. N
  42. This program allows the user to input data to a sales record. The data for the record are Name, Item, Quantity, Unit Price and VAT Rate and this data can be entered into memory by the user response to screen prompts. The input is checked for correctness of type and form. An initial menu allows the user to make a record file on disk or to open an existing record file and, once open, the user can append to, change data on or read from this record file. Because of the sequential storage of the records on disk, it is not easy to remove a record and pack the disk file. For simplicity, deletion is achieved by changing the record fields for name and item to spaces and the numeric fields to zeros, effectively giving an empty record. Finally when the user selects Quit, the program automatically closes the record file before returning to DOS. 
  43.  UserIO 
  44. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key U. <
  45. Program to illustrate user input from the keyboard and output to the screen. Use is made of the procedures Readln, Write and Writeln found in the System Unit, which does not have to be declared in the Uses clause as it is automatically made available. Consult the Library Reference for details of these procedures. 
  46.  Examples Open 
  47. To open a source code file select Open by arrow keys and then press ENTER, or by pressing O. Then use the tab key to move to the list of programs and then the arrow keys to select the required one. Then press ENTER. 
  48.  Notes  (Alt-N) 
  49. The Notes menu offers choices for opening files, changing directories, and exiting the program. $
  50.  Open          Change
  51. Dir    FExit
  52.  File
  53. Open  (F3) 
  54. The Open command displays the Open a File dialog box. In this dialog box you select the text file you want browse in a file
  55. viewer. &
  56. The Open
  57. File dialog box contains: 
  58.  an input
  59. box with a history list
  60.  a list
  61. box to browse the directory
  62.  the standard Cancel button
  63.  Open action button
  64.  an information panel that describes the
  65.    selected file
  66.  File
  67. Change Dir...
  68. Change Dir brings up the Change
  69. Directory dialog box, in which you can change the current directory. 
  70.  File
  71. DOS Shell 
  72. With the DOS Shell command, you can leave the program temporarily to perform a DOS command or run another program. 9
  73. To return to this program, type EXIT at the DOS prompt. 
  74.  File
  75. Exit 
  76.      (Alt-X)
  77. The Exit command terminates this program. 
  78.  Window 
  79.     (Alt-W)
  80. The Window menu contains commands to close, move and perform other window-management commands. 
  81. Most of the windows in this program have all the standard window elements, including scroll bars, a close box, and zoom icons. >
  82. For more about windows and their elements, refer to windows. :
  83.  Window-management commands
  84.  Size/Move        Zoom
  85.  Tile             Cascade
  86.  Next             Previous
  87.  Close
  88.  Window
  89. Size/Move 
  90.      (Ctrl-F5)
  91. Choose this command to change the size or position of the active window. 
  92.   Size
  93. If you press Shift while you use the arrow keys, you can change the size of the active window. Once you've adjusted its size or position, press Enter. Q
  94. If a window has a Resize corner, you can drag that corner to resize the window. 
  95.   Move
  96. When you choose Window
  97. Size/Move, the active window moves in response to the arrow keys. Once you've moved the window to where you want it, press Enter. F
  98. You can also move a window by dragging its title bar with the mouse. 
  99.  Window
  100. Zoom 
  101.    (F5)
  102. Choose Zoom to resize the active window to the maximum size. If the window is already zoomed, you can choose this command to restore it to its previous size. {
  103. You can also double-click anywhere on the window's title bar (except where an icon appears) to zoom or unzoom the window. 
  104.  Window
  105. Tile 
  106. Choose Window
  107. Tile to tile all file viewers on the desktop. L
  108.                
  109.                
  110.                
  111.                
  112.                
  113.                
  114.                
  115.                
  116.                
  117.                
  118.                
  119.                
  120.                
  121.                
  122.                
  123.                
  124.              Tiled Windows
  125.  Window
  126. Cascade 
  127. Choose Window
  128. Cascade to stack all file viewers on the desktop. A
  129.                          
  130.                          
  131.                          
  132.                          
  133.                          
  134.         Cascaded Windows
  135.  Window
  136. Next 
  137. Choose Next to cycle forwards through the windows on the desktop. 
  138.  Window
  139. Previous 
  140. Choose Previous to cycle backwards through the windows on the desktop. 
  141.  Window
  142. Close 
  143.     (Alt-F3)
  144. Choose Close to close the active window. O
  145. You can also click the Close box in the upper right corner to close a window. 
  146.  Options  (Alt-O) 
  147. The Options menu contains commands that let you change color and mouse default settings. 
  148.  Options
  149. Mouse... 
  150. The Mouse command brings up the Mouse
  151. Options dialog box, where you can set various options that control how your mouse works, including: R
  152.  how fast a double-click is
  153.  which mouse button (right or left) is
  154.    active
  155.  Options
  156. Colors... 
  157. The Colors item brings up the Colors
  158. dialog box, where you can customize the colors of the display. 
  159.  Options
  160. Save Desktop 
  161. Saves the state of all open windows to a file call TVDEMO.DSK. This file can be reloaded by selecting Options
  162. Restore
  163. Desktop. 
  164.  Options
  165. Restore Desktop 
  166. Restore a previously-saved state of all open windows from a file call TVDEMO.DSK. This file is saved via the Options
  167. Desktop menu command. 
  168.  Help on Open a File Dialog Box 
  169. The Open a File dialog box contains an input box, a file
  170. list, a file information panel, the standard button Cancel, one other action button (Open), plus a history list that's attached to the Name
  171. inputbox. 
  172.  Name 
  173.                                  
  174. The Name input box is where you enter the name of the file to load, or the file-name mask to use as a filter for the Files list box (for example, *.*). 
  175.  Files 
  176.                                  
  177.   FILENM01.PAS  
  178.   FILENM09.PAS  
  179.   FILENM02.PAS  
  180.   FILENM10.PAS  
  181.   FILENM03.PAS  
  182.   FILENM11.PAS  
  183.   FILENM04.PAS  
  184.   FILENM12.PAS  
  185.   FILENM05.PAS  
  186.   ..            
  187.   FILENM06.PAS  
  188.   \MOREXAMP     
  189.   FILENM07.PAS  
  190.   \TOURS        
  191.   FILENM08.PAS  
  192.   \ANSWERS.DIR  
  193. The Files list box lists the names of files in the current directory that match the file-name mask in the Name input box, plus the parent directory and all subdirectories. 
  194.  C:\TP\EXAMPLES\*.PAS                     
  195.  HELLO.PAS       52  Jul 14,1990  12:00pm 
  196. The File information panel shows the path name, file name, date, time, and size of the selected file. =
  197. None of the items on this information panel are selectable. 
  198.  [ Open ] 
  199. The Open button opens a new Viewer window and places the selected file in that window. 
  200.  [ Cancel ] 
  201. If you choose Cancel, nothing changes and no action occurs, and the dialog box is put away. M
  202. (Esc always cancels a dialog box, even if a Cancel button does not appear.) 
  203.  [ Open ] 
  204. In the Open a File dialog box, if you choose the Open button TVDEMO opens a new file
  205. viewer and places the selected file in that window. 
  206.  Help on the Change Directory dialog box 
  207. The Change Directory dialog box consists of an input box, a list box, the standard OK and Help buttons, and two other buttons (Chdir and Revert). |
  208.  Directory Name 
  209.                                      
  210. The Directory Name input box is where you type in the path of the new directory. 
  211.  Directory Tree 
  212.    Drives                            
  213. C:\                            
  214.      
  215. TP                           
  216.        
  217. TVISION                    
  218. The Directory Tree list box enables you to navigate directories by using the selecting bar and pressing Enter. 
  219. If you're using the keyboard, press Enter to make the selected directory be the current directory, then choose OK or press Esc to exit the dialog box. +
  220.  [Chdir ] 
  221. The Chdir button changes the current directory once you've selected or typed in a directory name. +
  222.  [Revert] 
  223. The Revert button goes back to the previous directory, as long as you haven't yet exited the dialog box. 
  224.  Help on the Mouse Options dialog box 
  225. This dialog box consists of one check box, one slider bar, and the standard buttons OK and Cancel. 
  226.  Mouse Double Click       
  227.  Slow     Medium     Fast 
  228. The Mouse Double Click slider bar adjusts the double-click speed of your mouse. ^
  229.  [X] Reverse Mouse Buttons 
  230. Reverse Mouse Buttons makes the right mouse button take on the normal functions of the left--and vice versa. 6
  231.  See also:
  232.  Options
  233. Mouse...
  234. command
  235.  Help on the Colors dialog box 
  236. The Colors dialog box consists of two list boxes, a text display area, the standard OK, Cancel, and Help buttons, and one of the following: 
  237.  On color and black-and-white systems, it
  238.    also contains two color palettes.
  239.  On monochrome systems, it contains a set
  240.    of radio buttons instead of the palettes.
  241. This dialog box is where you can change the colors of different parts of this program. 
  242.  Group 
  243.    Desktop          
  244.    Menus            
  245.    Dialogs/Calc     
  246.    Puzzle           
  247.    Calendar         
  248.    Ascii table      
  249.                     
  250. The Group list box contains the names of the different regions of the program that you can customize. L
  251.  Item 
  252.    Color            
  253.                     
  254. When you select a group from the Group list, the Item list box displays the names of the different views in that region. 
  255.  Foreground 
  256.  Background 
  257. On color and black-and-white systems, you use the Foreground and Background palettes to modify colors. 
  258.  Colors 
  259. ) Mono low        
  260.   ( ) Mono high       
  261.   ( ) Mono underscore 
  262.   ( ) Mono inverse    
  263. On monochrome systems, you use the Colors set of radio buttons systems to modify the character attributes. Q
  264.  Text Text Text 
  265.  Text Text Text 
  266. On all systems, the display text (above the Help button) shows the current color or attribute settings. a
  267. Changes do not take effect on the desktop until you close the Colors dialog box by choosing OK. 
  268.  Pointers 
  269. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key P. 
  270. This program illustrates the use of Pointers and Records. It also illustrates Variable Typecasts, so that the value of a pointer variable can be evaluated and hence the segment and offset of the variable pointed to can be found. The functions 'seg' and 'ofs' are also used for this purpose. Then by changing to the OS shell, the user can enter DEBUG and display (d Seg:Ofs) to check the location of the records in memory. Note the apparent multiple storage with a 16-bit machine with 1 Mbyte of memory and explain this paradox. It is based on a program in the Turbo Pascal version 3 Manual, with additional declarations and statements by Ron Shaw. 
  271.  Run Examples 
  272. Select the appropriate example from the sub-menu, by using the arrow keys and pressing ENTER, or by pressing the appropriate highlighted letter. 
  273.  Binary Trees 
  274. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key B. K
  275. Program to show how a binary tree can be used to order a set of integers. 
  276.  DOS Operations 
  277. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key D. N
  278. Program to illustrate the use of DOS operations from a Turbo Pascal Program. 
  279.  BIOS interrupt 
  280. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key I. 
  281. Program to illustrate Turbo Pascal INTR procedure, which uses DOS. The BIOS Interrupt Service 10 Hex is used with Function (AH) = 0F For use with Version 5 + of Turbo Pascal. Version 3 is different because Registers is not predefined in DOS, but user defined. 
  282.  KeyCheck 
  283. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key K. 
  284. This program illustrates the use of Units in Turbo Pascal, whereby compiled code can be incorporated into the current program. The unit is called LIMITKEY.TPU and provides a procedure that only allows a selected set of keys to be acceptable input. The selected keys are defined as the first parameter of the procedure LimitChar. Based on a program by David Arber of David Arber Associates. 
  285.  Double linked list 
  286. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key T. 
  287. Program to display on the screen the creation of a double-linked list on the Heap and to show the action as the records of the list are traversed both forward and backward under the control of the right and left arrow keys. The functions Seg and Ofs are used to determine the addresses on Heap of each record of the linked list and these addresses are then displayed as Seg:Ofs for the record and for its fields Previous and Next. The Number field is also displayed. The active record is shown in red. 
  288.  Linked list on the Heap 
  289. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key H. 
  290. The program demonstrates the creation of a single linked list of records on the Heap, using pointers. The user is invited to enter the name, as a string[15], and price in pence, as an integer, for three items, which form the linked list. 
  291.  Procedure 
  292. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key C. 8
  293. Program to illustrate the use of a procedure with parameters. The procedure simply creates a Times Table for the entered value of the multiplicand, or base, for the range of multiplier values also entered by the user. The procedure is called TimesTable and has the three parameters: BaseValue, Lower and Upper. 
  294.  Function 
  295. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key F. y
  296. Program to illustrate the use of a function, in this case to evaluate a number raised to a power ( x ^ y ). The number is referred to as the base value and the power is the exponent. Negative base values with fractional exponents are excluded in this simple program as they would require the use of complex numbers. A unit POWERU.TPU is available to handle complex solutions. 
  297.  OverLays 
  298. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key O. 
  299. Program to illustrate the use of Overlays, whereby code is contained in a number of units on disk and is called into overlay section of memory when required. Useful when memory is otherwise fully used. Some modifications made to the original Borland program to give screen indication of the overlay in use. For details refer to chapter 13 The Overlay Unit in the Programmer's Guide (version 6.0). 
  300.  Structure 
  301. This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key S. ?
  302. Program to illustrate the structure of Turbo Pascal programs. 
  303.  None 
  304.