We all have heard this word (actually two words) in reference to many languages like python, perl etc. But what
does it actually mean?
Actually, their has never been any particular definition to discriminate a language as a scripting language, but the
general common features are (I will be using python (scripting language) and C++ (non-scripting language) as an
- These languages are generally purposed for system administration, web programming, text processing etc.
- These languages are very casual in respect to the differentiating of variables according to their type.
So their is little or no distinction between integer or floating point or string variables.
char d,e; //e represents a string
- Arrays can thus mix elements of different types such as integers, strings etc.
- Their functions can also return non-scalar elements like arrays. Moreover, these non-scalars can also
be used as loop indexes etc.
a=[‘Mon’,’Tue’,’Wed’,’Thu’,’Fri’] #initialisation of the tuple
for i in a: #loop runs till i reaches end of the tuple
print(i) #print value of ‘i’
This program prints all the working weekdays…
- Lots of high-level intrinsic operations eg. string concatenation and stack push/pop re a lot easier.
In C++: concatenation of strings:
using namespace std;
In python: concatenation of strings:
The programs are interpreted rather than being compiled. (The basic difference between interpreting and
compilation is that in interpretation, the code is checked line by line and the processing stops whenever an error is
encountered where as in compilation, the whole code is checked in one whole go and all the errors are reported at
the end. The topic of compilation and interpretation will be picked in a later time.)