The Integrated Development System:
Turbo C features an integrated development environment or IDE. It is also referred as Programmer’s Platform. It is a screen display with windows and pull down menus. The program listing, its output, error messages and other information are displayed in separate windows.
You use menu selections or key combinations to invoke all the operations necessary to develop your program, including editing, compiling, linking, and program execution. You can even debug your program within IDE.

The Command-Line Development System
:

You should be aware that there is another completely different way to develop C programs in Turbo C. This is a traditional command line system, in which editing, compiling, linking, debugging and executing are invoked from the DOS command line as separate activities, performed by separate programs.

Directories:
Unless you tell it, by default the install program puts all the sub-directories and files in a directory called TC. You can also change the name of directory and path to which directory will be created by install program. Do not change the name of sub-directories like BIN, INCLUDE, LIB and so on.

Files used in C Program Development
:
There are number of files which comes with Turbo C system. At this point, it is difficult to understand exactly what all these files do, but you should have rough idea before plugging to your first C program. These different files used are as follows.
  • Executable Files
  • Library and Run Time Files
  • Header Files
  • Programmer Generated Files
Executable Files:
These files are stored in the sub-directory BIN. The most important executable at least is TC.EXE. Executing this program loads the IDE on your screen. BIN directory also contains programs for the command line development process previously a bit discussed and utility programs for use in specialized situations. Here are some of them as follows.
  • TCC: Command-Line Compiler
  • TLINK: Command-Line Linker
  • MAKE: File Management Program
  • GREP: searches for strings in groups of files
  • TOUCH: updates file date and time
  • CPP: Preprocessor utility
  • TCINIST: customizes Turbo IDE.
  • TLIB: Library File Manager
  • UNZIP: unpacks ZIP (compressed) files
  • OBJXREF: object file cross-reference utility
  • THELP: popup utility to access help file
Library and Run-Time Files:
Various files are combined with your program during linking. These files contains routines for a wide variety of purposes. These are library files, run-time object files, and math library files. They are all stored in LIB directory.

Library Files:
Library files are groups of precompiled routines for performing specific tasks. For example, if programmer uses a function such as printf( ) which is described later to display text on screen, the code to create the display is contained in a library file. A library file has a unique characteristics i.e. only those part parts of it that are necessary will be linked to a program not the whole file.

Math Libraries
:
If you are using floating point arithmetic in your programs you will need another library file. For example, maths.lib, mathc.lib and so on.

Run-Time Object Files:
In addition to library files, each program must be linked with the run-time library object file. Such as c0s.obj, c0c.obj etc. These files contains the code to perform various functions after your program is running, such as interpreting command line arguments.

Header Files:
The sub directory called INCLUDE contains header files. These files are also called “include” files. These are text files like the one you generate with the word processor or Turbo C editor. Header files can be combined with your program before it is compiled.
Header files serve several purposes. You can place statements in your program listing that are not program code but are instead messages to the compiler. These messages are called Compiler Directives, can tell the compiler such things as the definitions of words or phrases used in your program. Some useful compiler directives have been grouped together in header files, which can be included in the source code of your program before it goes to the compiler.
Header files also contains the prototypes for the library functions. Prototypes provide the way to avoid program errors.later we will discuss in detail the header files and prototypes.

Programmer Generated Files
:
You can place your program anywhere on the Hard Disk. When IDE is loaded you can open it from the hard disk by giving path and enjoy your programming.

Why does C uses so many files?

Dividing the different aspects of the language into separate files gives the language more flexibility. By keeping the input / output routines in separate library files. For instance, it is easier to rewrite C to work on different computer. All that needs to be changed are the files containing I/O functions. The language itself remains the same.

Posted by IRFAN Friday, April 2, 2010

0 comments

Post a Comment