Professional Documents
Culture Documents
Languages
24 July 2007
GS19011
GS18487
GS19143
GS18625
GS18971
GS18788
GS?????
Low-level program
class
class Triangle
Triangle {{
...
...
float
float surface()
surface()
return
return b*h/2;
b*h/2;
}}
LOAD
LOAD r1,b
r1,b
LOAD
LOAD r2,h
r2,h
MUL
MUL r1,r2
r1,r2
DIV
DIV r1,#2
r1,#2
RET
RET
00010010010001010010
00010010010001010010
Executable Machine code 01001110110010101101
01001110110010101101
001...
001...
Assembly Language
Machine Languages
1st generation programming language
Considered a low-level language because it involves basic coding using
the binary symbols 1 and 0
SQL
Logic
uncle(X,Y) :- parent(Z,Y), brother(X,Z).
Language Categories
Programming Languages can be categorised in
many different ways. Some of the categorise are as
follows:
Procedural Languages
Nonprocedural Languages
Imperative Languages
Declarative Languages
Functional Languages
Logic Languages
Objected Oriented Languages
Fourth Generation
Fifth Generation
Scripting Languages
Language Categories
Imperative Languages
A language which operates by a sequence of commands that change the value of
data elements.
Central features are variables, assignment statements, and iteration
Language control structures direct the computer to execute an exact sequence of
statements.
Examples: C, Pascal, Fortran, Basic, C
Functional Languages
A functional language is one that operates by use of higher-order functions, building
that manipulate functions directly without ever appearing to manipulate data.
Main means of making computations is by applying functions to given parameters
Examples: LISP, Scheme. Miranda, ML, Hope and HQL
Logic Languages
A logic language deals with predicates or relationships p(X,Y).
Rule-based (rules are specified in no particular order)
It allows a programmer to describe the logical structure of a problem rather than
prescribe how a computer is to go about solving it.
Example: Prolog, SASL, LOGLIST, FUNLOG
Language Categories
Procedural programming language
A Procedural programming language provides the means for a programmer to
precisely each step in performance of task.
Through the language, step-by-step instructions on how the task is to be done
The programmer specifies language statements to perform a sequence of
algorithmic steps.
Examples: Ada, BASIC, C, C++, COBOL, Fortran, Pascal, Fourth, Algol68, and
Modula-2
Nonprocedural programming language
In a nonprocedural language the programmer tells the computer, through the
language, what must be done, but leaves the details of how to perform the task to
the language itself.
For examples: Dbase, ADS, SQL
Note that fourth-generation languages are all considered nonprocedural.
Visual Programming Languages (GUI)
Languages that use a mouse, icons, or symbols on the screen and pull-down
menus to develop programs
Examples: Visual C++, Visual Basic
Language Categories
Markup
New; not a programming per se, but used to specify the layout
of information in Web documents
Scripting languages (commonly called scripting programming
languages or script languages) are computer programming
languages that are typically interpreted and can be typed
directly from a keyboard. Thus, scripts are often distinguished
from programs, because programs are converted permanently
into binary executable files (i.e., zeros and ones) before they
are run.
Examples: XHTML, XML Language Categories
Object-oriented Languages
Languages that allow interaction of programming objects,
including data elements and the actions that will be performed
on them
It define uses classes, inheritance and polymorphism
Examples: Java, C++
Program Domains
Scientific applications
Large number of floating point computations
Fortran
Business applications
Produce reports, use decimal numbers and characters
COBOL
Artificial intelligence
Symbols rather than numbers manipulated
LISP
Systems programming
Need efficiency because of continuous use
C
Web Software
Eclectic collection of languages: markup (e.g., XHTML), scripting (e.g.,
PHP), general-purpose (e.g., Java)
Program Domains
Commercial
very like English, avoids mathematical notation, very good file
handling facilities. e.g.. COBOL
Scientific
extensive computational ability, in-built mathematical
functions, can handle mathematical expressions, array
handling. e.g. FORTRAN
Special Purpose
tailor made for specific problems eg CSL (simulation), Coral
(process control), Ada (real time systems e.g. controlling a
fighter plane), SQL (database ), Prolog (artificial intelligence),
LISP (List processing and artificial intelligence)
Program Domains
Multipurpose
useful over a variety of application areas eg. BASIC (easy to
learn and use), C (more difficult but more standard and
powerful)
Applications Generators
4th generation languages used to generate programs.
Generally used for very specific range of tasks eg generating
input forms.
Operating system command languages
most operating systems respond to commands and can also
read files that contain a sequence of OS commands. The OS
may also have the ability to store things in variable and to call
other command files (and even to pass parameters to these
files).
References
Any Question