• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Getting into JavaScript! > What Is the Difference Between a Script a...

What Is the Difference Between a Script and a Program?

This is a commonly asked question by those who are new to scripting and even those who have been using script for a while. The technical (read “gear head”) answer is that a script is a sequence of instructions (or sometimes even another program) that is interpreted or carried out by another program rather than by the computer's processor. What does this mean in the real world? Well, first off, to create a program you need another program (a compiler at the very least), whereas to write script the least that you want is a text editor (more on this in a minute). This means that scripts are easier and generally faster to write than programs are because they are written in more structured and compiled languages, such as C and C++.

However, a script does take longer to run than a compiled program because each instruction in the script is being handled by another program first (which requires additional programs to be loaded and more instructions carried out), rather than directly by the processor. However, this drawback is more than compensated for by the fact that a script can be written using a free text editor, whereas a C++ program can require software worth hundreds of dollars!


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint