Use of Turbo C 2.0 integrated development environment

Source: Internet
Author: User

Http://www.vcworld.net/news/200905/051102.html

 

After entering the integrated development environment of Turbo C 2.0, the screen displays:

The top line is the main menu of Turbo C 2.0, the middle window is the editing area, the next is the information window, and the bottom line is the reference line. These four windows form the Turbo C 2.0 main screen. Later programming, compilation, debugging, and running will all be performed on this main screen. The following describes the content of the main menu in detail.

1.5.1 Main Menu

The main menu is displayed on the top of the Turbo C 2.0 main screen. The following content is displayed: file edit run compile project options debug break/watch has sub menus in addition to edit, you can enter the sub-menu of an item by adding the first letter (uppercase letter) to alt.

I. File menu

Press Alt + F to go To the File menu, which includes the following:

. Load (load)

Load a file and select a list using a DOS-like wildcard (for example, *. C. You can also mount a file with another extension, as long as the file name (or only the path) is provided. The key of this item is F3, that is, you only need to press F3 in the main menu to enter this item, instead of entering the File menu and then selecting this item.

. Pick (select)

Columns the eight files in the most recently loaded editing window into a table for the user to choose from. After selecting the file, load the program into the editing area and place the cursor in the Last modified area. Its hot health for Alt-F3.

. New (new file)

This indicates that the file is new. The default file name is noname. C. You can change the name when saving the disk.

. Save (save disk)

Store files in the editing area. If the file name is noname. C, you will be asked if you want to change the file name. Its hot key is F2.

. Write to (storage)

You can give a file name to save the file in the editing area. If the file already exists, ask if you want to overwrite it.

. Directory) 

Displays the files in the directory and Directory, which can be selected by the user.

. Change Dir (Change directory)

Displays the current directory. You can change the displayed directory.

. OS shell (temporarily quit)

Temporarily exit Turbo C 2.0 to the DOS prompt. At this time, you can run the DOS command. To return to Turbo C 2.0, type exit in DOS state.

. Quit (Exit)

Exit Turbo C 2.0 and return to the DOS operating system. The hotkey is Alt + X.

Note:

The above items can be selected by moving the color bar with the light tag key, and then press enter to execute. You can also directly select the first uppercase letter of each item. If you want to return to the main menu or return from its next menu list box, you can use the ESC key. All the menus of Turbo C 2.0 use this method, which is not described below.

Ii. Edit menu

Press Alt + e to enter the editing menu. If you press enter, the cursor is displayed in the editing window. You can edit the text. The editing method is basically the same as WordStar. You can use the F1 key to obtain help information about the editing method.

The Edit-related function keys are as follows:

F1 obtains help information about the Turbo C 2.0 editing command.

F5 expands the editing window to the entire Screen

F6 switch between the editing window and the Information Window

F10 go from the editing window to the main menu

Edit command introduction:

Pageup front flip

Pagedn flip back

Home move the cursor to the beginning of the row

End move the cursor to the end of the row

CTRL + y Delete the row where the cursor is located

CTRL + T delete a word at the cursor

CTRL + kb set block start

CTRL + kk

CTRL + kv Block Movement

CTRL + KC copy

CTRL + Ky block Deletion

CTRL + kr Read File

CTRL + kW save file

CTRL + KP block file Printing

CTRL + F1 if the cursor is located at the Turbo C 2.0 library function, get help information about the function.

CTRL + Q [find the matching character of the Turbo C 2.0 dual-line operator

CTRL + q] Find the pre-match of the Turbo C 2.0 dual-line operator

Note:

1. The dual-boundary operators of Turbo C 2.0 include the following symbols:

Included characters {And}

Tip character <and>

Circle character (and)

Square brackets [and]

Annotator/* and */

Double quotation marks"

Single quote'

2. When editing a file, Turbo C 2.0 also has the ability to automatically indent, that is, align the cursor position with the previous non-empty character. In the editing window, CTRL + ol is the control key for the automatic indent switch.

3. Run menu

Press Alt + R to enter the run menu, which has the following items:

. Run)

Run the file name specified by the project/project name or the file in the current editing area. If the source code after the previous compilation has not been modified, it runs directly to the next breakpoint (if there is no breakpoint, it runs until the end ). Otherwise, the system runs only after compilation and connection. The key is Ctrl + F9.

. Program reset (Program Restart)

Stop the current debugging and release the space allocated to the program. The hot key is Ctrl + F2.

. Go to cursor (run to cursor)

When debugging a program, select this option to run the program to the row where the cursor is located. The row where the cursor is located must be an executable statement; otherwise, an error is prompted. The hot key is F4.

. Trace)

When you call a sub-function defined by another user, if you use the trace into item, the execution bar will be traced to the sub-function for execution, and its hot key is F7.

. Step over (single-step execution)

Execute the next statement of the current function. Even if the user calls the function, the execution bar will not be tracked into the function, and its hot key is F8.

. User Screen)

Displays the results displayed on the screen when the program is running. The hot key is Alt + F5.

 

Iv. Compile menu

Press Alt + C to enter the compile menu, which has the following content:

. Compile to OBJ (compile and generate the target code)

Compile a C source file to generate the. OBJ target file, and display the generated file name. The hotkey is Alt + F9.

. Make EXE file (generate the execution file)

This command generates a. EXE file and displays the generated. EXE file name. The. exe file name is one of the following items.

1. project file name described by project/project name.

2. If there is no project file name, the source file is described by primary C file.

3. If neither of the above two items has a file name, it is the file name of the current window.

. Link EXE file (connect to generate the execution file)

Concatenate the current. OBJ file and the library file to generate the. exe file.

. Build all (create all files)

Recompile all files in the project and assemble and generate the. exe file. This command does not perform an out-of-date check (the above commands require an out-of-date check, that is, if the source file date and time in the current project are the same or earlier as the target file, refuse to compile the source file ).

. Primary C file (Master C file)

After the main file is specified in this item, in future compilation, if there is no project file name, compile the main c file specified in this item. If there is an error in compilation, the file is transferred to the editing window, whether or not the main c file is in the current window.

. Get info(Obtain information about the current path, source file name, source file size, number of errors in compilation, and available space ).

 

5. Project menu

Press Alt + P to enter the project menu, which includes the following:

. Project Name (project name) 

The project name has an extension of. prj, including the name of the file to be compiled and connected. For example, a program consists of file1.c, file2.c, and file3.c. To compile the three files into a file.exe execution file, you can create a file. prj project file with the following content:

File1.c

File2.c

File3.c

Put file. prj into the project name. during future compilation, the three source files specified in the project file will be automatically compiled separately. Then connect to the file.exe file.

If some of the files have been compiled into a. OBJ file but have not been modified, you can directly write the. OBJ extension. At this time, the connection will not be compiled but will only be performed.

For example:

File1.obj

File2.c

File3.c

File1.c will not be compiled and directly connected.

Note:

When each file in the project file has no extension, it is treated as the source file. In addition, the file can also be a library file, but the extension. Lib must be written.

. Break make on (abort compilation)

The user selects whether to exit make compilation before warining (warning), errors (error), fatal errors (fatal error), or link (connection.

. Auto dependencies (automatic dependency)

When the switch is set to on, the date and time of the source file and the corresponding. OBJ file will be checked during compilation; otherwise, the check will not be performed.

. Clear Project (clear project files)

Clear the project file name in Project/project name.

. Remove messages (delete information)

Clear the error information from the Information Window.

 

6. Options)

Press Alt + O to enter the Options menu, which should be used with caution for beginners.

. Compiler (compiler)

This option has many sub-menus, allowing you to select hardware configuration, storage model, debugging technology, code optimization, dialog information control, and macro definition. The sub-menus are as follows: Model

There are six different modes available for tiny, small, medium, compact, large, and huge.

Define opens a macro definition box. You can enter a macro definition for the same user. Multiple definitions can be the same as semicolons, and values can be equal.

Code generation has many other options, which tell the compiler what target code is generated.

Calling convention can be used to pass parameters in C or Pascal mode.

The instruction set can be set to 8088/8086 or 80186/80286.

Floating point can be a floating point simulation, a mathematical coprocessor, or a non-floating point operation.

The default char type specifies the char type.

Alignonent specifies the address alignment principle.

Merge duplicate strings is used for optimization to combine repeated strings.

Standard stack frame generates a standard stack structure.

Test Stack Overflow generates code to detect stack overflow when a program is running.

Line number is placed in the. OBJ file for debugging.

OBJ debug information generates debugging information in the. OBJ file.

Optimization

Optimize for selects whether to small programs or optimize program speed.

Use register variable to select whether to allow use of register variables.

Register optimization tries its best to use register variables to reduce excessive number operations.

Jump optimization compresses the code by removing redundant jump and adjusting the cycle and switch statements.

Source

Indentifier Length indicates the number of valid characters of the identifier. The default value is 32.

Whether nested comments are allowed.

Whether ANSI keywords only allows only ANSI keywords or Turbo C 2.0 keywords

Error

Number of errors after error stop: stops compilation. The default value is 25.

The number of warning errors in warning stop after. The default value is 100.

Display warning

Portability warning portability warning error.

ANSI violations infringes the ANSI keyword warning error.

Common error common warning errors.

Less common error is a rare warning error.

Names is used to change the names of segments, groups, and classes. The default value is code, data, and BSS.

 

. Linker (connector)

This menu sets the connection options, which have the following content:

Map File menu: Select whether to generate a. Map File.

Whether the initialize segments are not initialized during connection.

Whether devault libraries searches for its default library when connecting to the target file generated by other compilation programs.

Whether the graphics library connects to functions in the graphics library.

Warn duplicate symbols generates a warning when there are repeated symbols.

Whether stack warinig generates no warning information for the connected program.

Whether case-sensitive links distinguish between large and small writing.

 

. Environment (Environment)

This menu specifies whether to enable automatic storage of certain files, tabulation keys, and screen size settings.

Message tracking

Current file tracks file errors in the editing window.

All files tracks all file errors.

Off.

Whether to clear the information in the message window before compiling the keep message.

When config auto save is selected, if the configuration of Turbo C 2.0 is changed before run, shell, or exit the integrated development environment, the changes will be saved to the configuration file. If you select off, It is not saved.

Whether edit auto save automatically stores the edited source file before run or shell.

Whether the backup file generates a backup file (. Bak file) when the source file is stored on the disk ).

Tab size: Specifies the tabulation key size. The default value is 8.

Zoomed windows zooms the current active window to the screen, and its hot key is F5.

Screen Size: set the screen text size.

 

. Directories (PATH) 

Specify the path of the files required for compilation and connection:

Include directories contains the file path. Separate multiple subdirectories.

Directory of the library directories. Separate multiple subdirectories.

Output directory of the directoried output file (. OBJ,. EXE,. map file.

The directory where Turbo C directoried Turbo C is located.

The pick file name defines the loaded pick file name. If it is not defined, it is obtained from the current pick file.

 

. Arguments (command line parameters) 

Allows you to use command line parameters.

 

. Save options (storage configuration)

Save all Selected Compilation, connection, debugging, and projects to the configuration file. The default configuration file is tcconfig. tc.

 

. Retrive options

Load a configuration file to TC. TC will use the selected items of this file.

 

VII. Debug menu

Press Alt + D to select the Debug menu, which is mainly used for error detection. It includes the following content:

Evaluate

The expression to calculate the result.

Result shows the calculation result of the expression.

New value is assigned to the new value.

Call Stack is inaccessible. When the Turbo C debuger is used to check the stack.

The find function is used to display the specified function when running the Turbo C debugger.

Refresh display if the editing window is accidentally overwritten by the user window, the content of the editing window can be restored.

 

8. Break/Watch (breakpoint and monitoring expression)

Press Alt + B to enter the break/watch menu, which has the following content:

Add watch inserts a monitoring expression into the monitoring window.

Delete watch deletes the current monitoring expression from the inner window.

Edit watch: edit a monitoring expression in the monitoring window.

Remove all watches delete all monitoring expressions from the monitoring window.

Toggle breakpoint sets or clears the breakpoint for the row where the cursor is located.

Clear all breakpoints clear all breakpoints.

View next breakpoint: move the cursor to the next breakpoint.

 

1.5.2 configuration file of Turbo C 2.0

The configuration file contains information about Turbo C 2.0, including information about compilation, connection selection, and path.

You can use the following method to configure Turbo C 2.0:

1. Create a custom configuration file

You can select the options/save Options command from the Options menu to save all configurations of the current integrated development environment to a configuration file named by the user. When you start TC next time, you only need to enter TC/C <User-Defined Configuration File Name> in DOS, and then select Turbo C 2.0 based on the content in this configuration file.

2. If options/environment/config auto save is set to on, when you exit the integrated development environment, the current settings are automatically stored in the tcconfig. TC configuration file of Turbo C 2.0. Turbo C automatically searches for this configuration file at startup.

3. Use tcinst to configure Turbo C and save the result to TC. EXE. When Turbo C is started, if the configuration file is not found, the default value in TC. EXE is used.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.