The definition of these two terms has to be taken with a grain of salt. What is a script, and what is a program?
Here's my take:
ANY set of instructions designed to be executed on a computer is a program. That INCLUDES scripts. Okay I can hear the battle cry already from the programmers. Hear me out first, okay?
A program does not HAVE to be a compiled program. Yes, compiled programs are one type of software. However, unless the program we're referring to is the operating system, like Linux or Windows or Mac OS, every single other program written for a computer is using other programs, Dynamic Link Libraries (DLL) in the world of Windows. So even though a program might be compiled, it's relying on other programs to do its work and so is not a "pure" compiled program.
On the other hand, if you're writing highly complex web based Internet applications using nothing but "scripts" written in PHP or Perl or Python or any of the other popular scripting languages, then you're writing computer programs.
So, I suppose, in a nutshell, a script is a program, but a program is not necessarily a script.
Then, to make matters more complex, you have languages like Java and Flash that sit somewhere in between the two. The language "compiles" code into a "script" that closely resembles the native language of the host machine, making it (in theory) more efficient and speedy. However, the environment to run the software must still be installed on the user's machine. Which is why you don't get interactive Flash or Java websites working properly unless you've got the right plug-in installed.
Did I just clarify things? Or add to the confusion?
Partly this answer was motivated by a negative stigma associated with programming using a scripting language. Hard-core programmers who use C# or C++ or Delphi sometimes derivatively refer to these other programmers as "scripters".
2006-08-18 06:56:15
·
answer #1
·
answered by Anonymous
·
1⤊
0⤋
WOH! A lot of answers for this one. Most are right in their own way.
A program is code that has been compiled into binary and linked into binary. In Microsoft Windows these are the .exe files. These programs run much faster than a script.
A script needs to be interpretted by a program for a computer to know what to do with it.
A script can mean many different things depending on what you're talking about. One version of a script is what I would call an "operating system script". These scripts are nothing more than sending the operating system(DOS or Windows or etc.) more than one command at a time. In the early days of computing before Windows and people used command prompts like DOS is when scripts became popular. People would issue multiple commands to DOS by putting all of those commands into a single file, then tell DOS to run those "Scripts". People might have a script that deletes all of their old log files for instance. Instead of typing out 10 delete commands, they would instead run just their "script". What can be accomplished using operating system "scripts" increases with each new version of Microsoft Windows \ Apple OS \ and Linux.
Another place where "script" is used now is in web programming. If you have a web page that is dynamic(changes with each view) then the web server is actually running scripts to determine what to show you. Examples of these types of scripts would be php, asp, javascript, etc...
Also, it is becoming increasingly popular for individual programs to come with "scripting". For instance Adobe Acrobat can embed scripts into PDF files that alter the behavior of the program.
Here's some examples of the difference between scripts and programs:
Video Games are programs.
A Web Browser is a program, but it may execute javascript which is a script.
A web server(like APACHE) is a program, but it can read scripts to decide what to show when someone accesses it.
As far as programming languages go:
C\C++ will compile into a program.
Something like perl is a script.
I hope this all makes sense to you.
2006-08-18 06:23:16
·
answer #2
·
answered by maddogg41283 2
·
0⤊
0⤋
A script is a series of commands that are all available to the user through menu commands and shortcut keys. When a script is run, it is as though the user is running those commands in sequence. For example, you might run a script in Microsoft Access that compiles a list of all customers that have not made a purchase in the last six months, and then print a letter to each one. It is called a script because it is made up of MS-Access commands, and can only be run in Access.
A program is a series of commands intended to run independently of any application. A program is usually compiled into a stand-alone ".EXE" file, but even those that require an interpreter, like QBasic, to run are still considered programs, because they are not application-oriented.
2006-08-18 06:29:18
·
answer #3
·
answered by Big Dave 2
·
0⤊
0⤋
A program is being compiled and cannot be read anymore in any editor.
Its running the way the PC likes it at full speed.
A script is interpreted, no executable program is created from it.
It needs an interpreter to do anything, the computer cannot read it.
Humans can read it.
2006-08-18 06:11:06
·
answer #4
·
answered by Chri R 4
·
0⤊
0⤋
Program needs a complier to make a exe or com file that can be run along with the program installed after compling
Script may not, could be just a bat file
A script can be a program, but program may not be a script.
2006-08-18 06:08:48
·
answer #5
·
answered by YourDreamDoc 7
·
0⤊
0⤋
Simply put, a program runs on a script. The script is composed of codes that "instruct" the program on how to function or run itself.
2006-08-18 06:08:26
·
answer #6
·
answered by ♥TransylvanianVamp♥ 3
·
0⤊
0⤋
There are two types of programming languages, compiled and interpreted.
When you write a program in a compiled language, it is transformed (compiled) into executable code, which can be distributed as a standalone program.
When you write a program in an interpreted language, the program is stored as source code and executed line by line by another program (the interpreter). Sometimes, the interpreter is built into an operating system (for example, the batch file interpreter in DOS and Windows) or into an OS shell (as in Unix), in other cases (Perl, PHP, Python), you need a standalone interpreter. Interpreted programs are often referred to as scripts.
2006-08-18 06:18:51
·
answer #7
·
answered by NC 7
·
0⤊
0⤋
script is what the program is based on before the program is complied it is numerous lines of code that could be called a script. once you compile the code it becomes a program
ever heard of Java Script and Java Beans?
2006-08-18 06:09:42
·
answer #8
·
answered by Demetri N 2
·
0⤊
0⤋
a program is something worth doing and entertaining like a game or something. the script is the code they use for making that game like your background code is a script ever saw movies where they upload viruses and all you see is letters symbols and some words that's a script
so a program is the out come of the script
2006-08-18 06:10:20
·
answer #9
·
answered by Dum Spiro Spero 5
·
0⤊
1⤋
Generally a program is compiled into an executable first. Most scripts are compiled at run time.
2006-08-18 06:08:58
·
answer #10
·
answered by porphryn_news 1
·
0⤊
0⤋