When we are saying Environment Setup, it simply means we need to have a base on top of which we can do our programming. Thus, we need to have required software setup, i.e., installation on our PC which will be used to write our Computer Program, Compile and Execute it. For example, if you need to browse Internet, then you need the following setup on your machine:
- A working Internet Connection to connect to the Internet.
- Web Browser like Internet Explorer, Chrome, or Safari, etc.
- A text editor to create computer program.
- A compiler to compile program into binary format.
- An interpreter to execute program directly.
What is Text Editor?
This is a Software, which will be used to write your computer program. Your Windows machine must have a Notepad, which can be used to type your program. You can launch it by following these steps:Start Icon → All Programs → Accessories → Notepad → Mouse Click on NotepadThis will launch Notepad with the following window:
If you are Mac user, then you will have TextEdit or you can install some other commercial editor like BBEdit, etc., to start with.
What is Compiler?
You write your computer program using your favorite programming language and save it in a text file called program file. What is next?Let's try to get a little more detail on how computer understands a program written by you using a programming language. Actually, computer cannot understand your program directly given in the text format, so we need to convert this program in a binary format, which can be understood by the computer.
The conversion from text program to binary file is done by another software called Compiler and this process of conversion from text formatted program to binary format file is called program compilation. Finally, you can execute binary file to perform the programmed task.
We are not going into detail of different constituents of a compiler and different phases of compilation.Following flow diagram gives an illustration of the process:
What is Interpreter?
We just discussed about Compiler and Compilation Process. This is required in case you are going to write your program in a programming language, which needs compilation into binary format before its execution. Few examples of such programming languages are C, C++, Java.There are programming languages like Python, PHP and Perl, which do not need any compilation into binary format, rather an interpreter can be used to read such program line by line and execute it directly without any further conversion.
No comments:
Post a Comment