Turbo C (V2.0) User Guide

zhaozj2021-02-16  141

Turbo C (V2.0) Guide (many of this article or method is also available for TC3) Before you begin to see this article, I will first explain the most important place to install and use in the C language: Many users download Turbo C After 2.0 and Turbo C 3.0, I asked me the most in the process of using the following questions: 1) I can't find the include file such as stdio.h conio.h; 2) Cos.obj cannot be connected. Errors These issues are due to no paths caused by the path, the current downloaded TC2, TC3 has two versions of the installation classification: First, install it through install, such a path should have been set; the other is directly extracted, establish TC. Exe's shortcuts, you can run in Windows (DOS directly running tc.exe), currently in China, therefore, please pay attention to the path settings before downloading: Option-> Directories: include: 【 TC2 / 3 Site] / includeLIB: [TC2 / 3 "Social] / liboutput Output Directory Please set your own work directory to avoid mixing together. Finally, a point is reminded: Change Dir in File should be set to the current program where the current program is located. First, the installation of Turbo C 2.0 and the installation of Turbo C 2.0 is very simple. Just insert a 1 # disk into the A drive, type: a> install under DOS "A>", at this time, three types Select: 1. Create a new directory on the hard disk to install the entire Turbo C 2.0 system. 2. Update the Turbo C 1.5. Such installation will retain the settings for the original, color, and editing function keys. 3. Install Turbo C 2.0 for systems with only two floppy disks without a hard disk. Here, it is assumed to be installed according to the first selection, as long as the on-board number is pressed during the installation process, the installation can be successfully installed, and the installation will be established in the root directory of the C drive, TC Two directory lib and include, lib subdirectories are also established, and all header files are stored in the include subdirectory. When running Turbo C2.0, you can enter the Turbo C 2. 0 integrated development environment as long as you type TC in the TC subdirectory and enter your business. Second, the use of Turbo C 2.0 integrated development environment After the Turbo C 2.0 integrated development environment, the screen is displayed: ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ──── File Edit Run Compile Project Options Debug Break / watch┌────────────Ed i t──────────────┐│ Line 1 Col 1 Insert Indent Tab File Unindent C: Noname.c ││ ││ ││ ││ ││ ││ ││ │││ │ ││ ││ │ │ ││ ││ │ │ │ ││ │ │ ││ ││ ───────────────────────────────── ││ ││ │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ Step F9-Make F10-Menu - ─────────────────────────────────────────gyric thing as Turbo C 2.0 main menu, middle The window is the editing area, next to the information window, the bottommost line is a reference line. These four windows constitute the main screen of Turbo C 2.0, after programming, compile, debugging, and running will be performed in this home screen. The contents of the main menu will be described in detail below.

1. The main menu is on top of the Turbo C 2.0 home screen, showing the following: File Edit Run Compile Project Options Debug Break / Watch In addition to edit, other items have submenus, as long as ALT is added to a certain item The first letter (ie uppercase letters) can enter the submenu of the item. FILE (File) menu ---- Press Alt F to enter the File menu, which includes the following: .load (load) is loaded with a list of DOSs (such as * .c). You can also load other extensions, as long as the file name (or only the path) is given. The hotkey of this item is F3, ie, as long as you press F3 in the main menu, you can enter the item without need to enter the File menu and then select this item. .Pick lists the 8 files recently loaded into the editing window allows the user to select, after selecting the program into the editing area, and lays the light to the last modified place. It is thermal into ALT-F3. .New (new file) Description file is new, the default file is named Noname.c, and the rename is renamed when the deployment. .Save (storage) will ask if the file name is Noname.c, if the file name is Noname.c, the hotkey is F2. .Write to (save) can give the file name in the editing area by the user, if the file already exists, ask if you want to overwrite. .Directory (directory) Displays files in the directory and directory, and can be selected by the user. .Change Dir Displays the current directory, the user can change the displayed directory. .OS shell (Temporarily Exit) Temporarily exit Turbo C 2.0 to DOS prompt, at which time you can run the DOS command, if you want to go back to Turbo C 2.0, you can type EXIT in the DOS state. .Quit (exit) exits Turbo C 2.0, returns to the DOS operating system, the hotkey is Alt X. Explanation: The above can be selected with the cursor keys to move the color bar, and the carriage return is performed. You can also choose from the first uppercase letter for each item. To return to the main menu or return to the next level menu list box to return to the ESC key, all menus of Turbo C 2.0 use this method, and the following will not be described. Edit menu --- Press Alt E to enter the editing menu. If you return it, the cursor appears in the edit window, at which time the user can edit text. The editing method is basically the same as WordStar, and the F1 key can be used to obtain help information about the editing method. The function keys related to editing are as follows: f1 Get the help information of the Turbo C 2.0 Edit Command F5 Enlarge Edit window to the entire screen F6 switched between the edit window and the information window to transfer the F10 from the edit window to the main menu Edit command: Pageup The front page pagedn is turned backward home to move the cursor to the start of the row END to move the cursor to the end of the line Ctrl Y Delete the cursor where the cursor is located. Ctrl KB Setting block. Ctrl KK Set Block End CTRL KV Block Mobile Ctrl KC Block Copy Ctrl KY Block Delete Ctrl KR Read File Ctrl KW Save File Ctrl KP Block File Print Ctrl F1 If the cursor is the Turbo C 2.0 library function The help information about the function is obtained Ctrl Q [Look for the Turbo C 2.0 Dual Matcher Ctrl Q] Find the front matching of Turbo C 2.0 Double Radger Description: a. Turbo C 2.0 Double Defense Including the following symbols: Petronics {} poacon <> curate () square parentheore [] comment / * * / double quotation marks "single number '' Turbo C 2.0 has a function when editing files It is possible to automatically indent, namely the cursor positioning, and the previous non-empty character alignment. In the editing window, Ctrl OL is the control key of the automatic indent switch. Run (running) menu --- Press Alt R to enter Run Menu, this menu has the following: .Run (Run Programs) Run the file name or the file name or the current editing area specified by the Project / Project Name item.

If you have not modified the last compiled source code, you run directly to the next breakpoint (no breakpoint is running to the end). Otherwise compile, run after the connection, the hotkey is Ctrl F9. .Program reset aborted the current debug, release the space divided into the program, the hotkey is Ctrl F2. .Go to Cursor (running to the cursor) When you debug a program, select this item to make the program run to the cursor. The cursor is in the line must be an executable statement, otherwise the prompt is wrong. Its hotkey is F4. .Trace INTO (Tracking) When performing a sub-function that calls other user-defined subunies, the execution general strip will track to the inside of the subfact, the hotkey is F7. .Step over executes the next statement of the current function, even if the user function is called, the execution general strip does not track the inside of the function, the hotkey is F8. .User screen displays the result of the program running on the screen when the program is running. Its hotkey is Alt F5. Compile menu --- Press Alt C to enter the Compile menu, the menu has the following contents: .Compile to obj (Compile Generate Target Code) Compiles a C source file to generate .Obj target files, and display generation File name. Its hotkey is Alt F9. .MAKE EXE FILE (Generate Execution File) This command generates a .exe file and display the generated .exe file name. Where the .exe file name is one of the following. A. Name of the project file description by Project / Project Name. B. If there is no project file name, the source file description by Primary C File. C. If there is no file name above, the file name of the current window. .LINK EXE FILE (Connection Generation Execution File) Connect the current .Obj file and library files together to generate .exe files. .Build All (Create all files) Re-compiling all files in the project and assemble the build .exe file. This command does not perform an extensive check (there are several commands to be checked, that is, if the date and time of the current project source file is the same or earlier in the target file, the source file is rejected. .Primary c file (main C file) When the primary file is specified in this item, in future compilation, if there is no project file name, compiling the main C file specified in this item, if there is an error in the compilation, This file is transferred to the editing window, regardless of the main C file in the current window. .GET INFO gets information about the current path, source file name, source file byte size, compilation, and available space. Project Menu --- Press Alt P to enter the Project menu, which includes the following: .project name (project name) project name has .PRJ's extension, including file names that will be compiled, connected. For example, there is a program consisting of file1.c, file2.c, file3.c, to compile these three files into a file.exe execution file, you can build a file.prj project file, which is as follows: File1.c file2.c file3.c At this point, the file.prj is placed in the Project Name entry, and the three source files specified in the project file will be compiled separately when compiling. Then connect to a file.exe file. If some of some of these files have been compiled into .Obj files, but have not been modified, you can write directly .Obj extension. The connection will not be compiled. For example: file1.obj file2.c file3.c will not be compiled, and directly connect to File1.c. Note: When each file in the project file is free, all according to the source file, in addition, the file can also be a library file, but must write the extension .lib. . BREAK Make ON is selected by the user whether it is compiled with the Make when there is a Warining (Warning), ERRORS (Error), Fatal Errors or Link (Connection). .Auto dependengies (Automatic dependencies) When the switch is ON, the source file and the corresponding .Obj file date and time will be checked, otherwise it will not check. . Clear Project Clears the project file name in Project / Project Name.

.Remove Messages Clear the error message from the information window. Options --- Press ALT O to enter the Options menu, which is used with initiator. .COMPILER This item selects many submenus, allows users to select hardware configuration, storage model, debugging technology, code optimization, conversation information control, and macro definition. These submenus are as follows: Model has Tiny, Small, Medium, Compact, Large, and huge six different modes can be selected by the same selection. Define opens a macro definition box, and the same host can enter macro definition. Multi-definition can be used as a selection, assignment available equal sign. Code generation has many options that tell the compiler what kind of target code. Calling convention can select C or PASCAL way to pass parameters. Instruction Set Select 8088/8086 or 80186/80286 instruction series. FLOATING POINT selects simulation floating point, mathematical coprocessor floating point or no floating point operation. Default Char Type specifies the type of char. AlignNent specifies the address alignment principle. Merge Duplicate Strings makes optimized, combining duplicate strings together. Standard Stack Frame produces a standard stack structure. Test Stack Overflow generates a program running code that detects the stack overflow. Line Number is placed in the .Obj file for debugging. Obj debug information produces debugging information in .Obj files. The OptimizationOptimize for select is to optimize the program miniaturization or the program speed. Use register variable is used to select whether register variables are allowed. Register Optimization uses register variables as much as possible to reduce excessive number of taps. Jump Optimization is removed by removing excess jumps and adjusts the way to cycle and switching statements. Source Indentifier Length illustrates the number of identifier valid characters, default is 32. NESTED Comments allows nesting. ANSI Keywords ONLY is only allowed by the ANSI key or the Turbo C 2.0 keyword error ERROR STOP AFTER stops compiling, default is 25. How many warnings when WARNING STOP AFTER stops compiling, it is 100. Display Warning Portability Warning Portion Warning error. ANSI ViOLATIONS infringes the warning error of the ANSI keyword. Common Error common warning error. Less Common Error rare warning error. Names is used to change the name of Segment, Group (Group), and the default is Code, Data, BSS. .Linker This menu sets the selection of the connection, which has the following: Map file menu Select whether to generate .map file. Initialize Segments does not initialize the paragraph that does not initialize during connection. DEVAULT LIBRARIES is looking for its default libraries when connecting the target files generated by other compilers. Does Graphics Library connects to a function in the Graphics library. WARN DUPLICATE SYMBOLS Generates warning information when there is a repeating symbol. STACK WARINIG is whether the connection program produces no Stack warning information. Does Case-Sensitive Link distinguish between large, lowercase. .Environment This menu specifies whether the file error in the edit window is tracked for some files and tab keys and screen sizes. All files track all file errors. OFF is not tracked. Keep Message is compiled to clear the information in the Message window.

转载请注明原文地址:https://www.9cbs.com/read-8223.html

New Post(0)