Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between a script and a program? [closed]

Tags:

scripting

What is the difference between a script and a program? Most of the time I hear that a script is running, is that not a program? I am bit puzzled, can anybody elaborate on this?

like image 667
giri Avatar asked Feb 18 '10 05:02

giri


People also ask

What is the difference between a python script and program?

Generally, all the scripting languages are considered programming languages. The main difference between both is scripting languages don't require any compilation and are directly interpreted. The compiled codes execute faster than the interpreted codes as they are changed in to a native machine program.

Is script also called a program?

1) In computer programming, a script is a program or sequence of instructions that is interpreted or carried out by another program rather than by the computer processor (as a compiled program is). Some languages have been conceived expressly as script languages.

Is coding and scripting the same?

It is faster to write scripts as they are usually written to automate a specific task within the main program/software. Coding in a Programming language is time taking as it involves designing a complete software. Scripts are written within a parent Program. These Programs exist and run independently.

What is the difference between script and algorithm?

An algorithm is best described in words, maybe as pseudo-code. A script is a program written in a scripting language.


1 Answers

For me, the main difference is that a script is interpreted, while a program is executed (i.e. the source is first compiled, and the result of that compilation is expected).


Wikipedia seems to agree with me on this :

Script :

"Scripts" are distinct from the core code of the application, which is usually written in a different language, and are often created or at least modified by the end-user.
Scripts are often interpreted from source code or bytecode, whereas the applications they control are traditionally compiled to native machine code.

Program :

The program has an executable form that the computer can use directly to execute the instructions.
The same program in its human-readable source code form, from which executable programs are derived (e.g., compiled)

like image 186
Pascal MARTIN Avatar answered Oct 23 '22 17:10

Pascal MARTIN