The difference between a script and a program is one is a subset of another. A program is typically a piece of text that contains instructions. A script is a program that is interpreted in real time and then turns it into a lower level language. Of course, that leaves java, which isn't a script language, in a fuzzy definition.
I agree that one is a subset of the other, but differ in your idea of what constitutes a script. To me, a program (in the computer programming sense) is a sequence of instructions for a computer to execute. These instructions can be in any form, assembly, C, Perl, byte code, whatever. A script is exactly the same thing but bent towards the human side of readability rather the computer side of readability. Scripts are most often higher-level languages because of this and I think the idea that "scripts are interpretted in real time" falls out of this merely as a matter of consequence. The higher-level the language the greater it's scriptiness If I created a C interpretter would the C programs I write for it suddenly be scripts? I don't think so. By your definition they would be. Scriptness is innate in the language, not the implementation. So, Java programs are also Java scripts in this sense. But that's just my opinion I think the whole idea of "script" vs "program" is sort of meaningless these days though. In the old days it meant interpretted vs. compiled, but that dichotomy has gotten fuzzier with time.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|