ARTICLE PASCAL

A. WHAT IS PASCAL ?
high level programming language developed by Niklaus Wirth in Zurich in the late 1960s until the early 1970s. Pascal is a structured programming language, so often used as a means of beginning to learn computer programming techniques. Pascal language versions that are widely used artificial Turbo Pascal Borland International, which works in DOS environment. Later, Pascal also developed as a visual programming language in Windows operating system environment with the name of Delphi.

B. HISTORY of PASCAL
Pascal is based on the ALGOL programming language and named in honor of mathematician and philosopher Blaise Pascal. Wirth subsequently developed the Modula-2 and Oberon, languages similar to Pascal, and earlier, also the language Euler.
Initially, Pascal was a language intended to teach students structured programming, and generations of students have "cut their teeth" on Pascal as an introductory language in undergraduate courses. Variants of Pascal are still widely used today, for example Free Pascal can be used in both 32 and 64 bit formats, and all types of Pascal programs can be used for both education and software development
Examples of usage
Pascal was the primary high-level language used for development in the Apple Lisa, and in the early years of the Mac; parts of the original Macintosh operating system were hand-translated into Motorola 68000 assembly language from the Pascal sources. The popular typesetting system TeX by Donald E. Knuth was written in WEB, the original literate programming system, based on traditional Pascal, while an application like Total Commander was written in Delphi (i.e. Object Pascal).

C. ABOUT BLAISE PASCAL (1623 – 1662)


Blaise Pascal was born June 19, 1623 in Clermont, Auvergne, France. Blaise's mother died when he was three years old. Blaise's father, Etienne, oversaw Blaise's education at home. Etienne decided that Blaise was not to study mathematics until age 15. At age 12, Blaise's curiosity in geometry grew as he rediscovered many of Euclid's elements on his own. When his father realized this he relented and gave Blaise a copy of Euclid's book.
In 1639 the family moved to Rouen where Etienne had been appointed as a tax collector. Blaise had his first paper, Essay on Conic Sections published in February 1640. In an effort to make his father's work easier, Pascal invented a calculator, which used the movement of gears to add or subtract. The device was called the Pascaline and it resembled the mechanic calculator of the 1940's. Only about 50 calculators were manufactured, because not many could afford the price.
In 1647 Pascal wrote New Experiments Concerning Vacuums, however many scientists disagreed on whether a vacuum exists. Descartes visited Pascal for two days and they argued about the vacuum. In a letter that Descartes wrote to Huygens he stated, "Pascal has too much vacuum in his head." Pascal continued to work on mathematics and physics writing Treatise on the Equilibrium of Liquids (1653) and The generation of Conic Sections (1654).
Pascal wrote Treatise on the Arithmetical Triangle, which is a triangular array of numbers that had been handed down by Chinese mathematicians several centuries earlier. Pascal discovered new properties of the triangle and solved problems using it, therefore the triangle became known as "Pascal's Triangle."
Pascal became interested in probability when given a gambling question. The dice problem asks how many times one must throw a pair of dice before one expects a double six while the problem of points asks how to divide the stakes if a game of dice is incomplete. In correspondence with Fermat, they solved the problem of points for a two-player game. Pascal with Fermat laid the foundation for the theory of probability.
Pascal nearly lost his life in an accident in 1654. The horses pulling his carriage bolted and the carriage was left hanging over a bridge above the Seine River. Although he was not physically hurt, this accident affected him psychologically. He soon pledged his life to Christianity. Much of his work was then centered on theology. In his work Pensees, Pascal claims to prove that belief in God is rational with the following argument. "If God does not exist, one will lose nothing by believing in him, while if he does exist, one will lose everything by not believing. We are compelled to gamble."
Pascal suffered a toothache, which kept him awake at night. In an effort to take his mind off the pain he focused on the cycloid, the curve traced by a point on the circumference of a rolling circle. Pascal solved the problem of the area of any segment of the cycloid and the center of gravity of any segment. He also solved the problems of the volume and surface area of the solid of revolution formed by rotating the cycloid about the x-axis.
Pascal died at the age of 39 from a malignant stomach ulcer. Pascal never married and he will be remembered by his work in mathematics, physics, philosophy, and religion.

D. PASCAL PROGRAMMING LANGUAGE
The computer programming language Pascal is one of the landmark programming languages on which generations of students cut their teeth and variants of which are still widely used today. TeX and much of the original Macintosh operating system were written in Pascal.
1. Pascal and C
Pascal was developed about the same time as C, and there are important similarities between the two. Both were strongly influenced by Algol 60 and incorporate many of its essential features, including its block structure and type system, although the approach to type safety is quite different.
The original Pascal and straight C are both small procedural languages implementing structured programming concepts. Both have functionality for dynamic allocation of memory and some form of pointer manipulation. However, Pascal was designed, mainly, as a teaching language. Error-prone constructs were carefully avoided, and an effort was made to make the syntax easy to understand. The authors of C placed more emphasis on brevity, because C was designed for professional programmers.
The main differences between the original Pascal and C are the following:
• C has lots of operations which change their first operand (++ -- += etc.) There is no consensus on the use of these operators.
• C has bitwise operations (| & ^ ~ << >>), while Pascal has sets.
• C allows much greater freedom with pointers. In C, you can access any address in memory directly: given a variable a, an operation &a returns its address. There are functions malloc() and calloc() which allocate any number of bytes. Pointers and arrays are often interchangeable. This makes C more concise than Pascal for low-level programming, but can lead to difficult to trace bugs.
• Pascal allows passing parameters either by value or by reference. In C, parameters can be passed only by value, and call by reference requires explicitly passing a pointer value.
• Pascal provides subrange types, which are very useful for early detection of bugs.
• Pascal lacks separate compilation.
• Pascal lacks preprocessing. There is nothing in original Pascal which resembles #include, #define, #ifdef etc.
• C supports different lengths of numbers (short int, int and long int; float and double) and unsigned integer numbers and characters. In Pascal, all numbers are of fixed length, and there are no unsigned numbers.
• In C, there is no boolean type.
• C lacks typesafe enumerated types which are present in Pascal.
• Pascal lacks continue and break operators.
• Pascal permits nested function definitions.
• Pascal doesn't guarantee anything about certain border cases like if x is passed twice to the same procedure (once by reference, once by value). This is the classic, but true "why Pascal is faster than C" joke in NGs.
• the original Pascal disallowes pointers inside of symbols. (e.g. @/& of a record field is disallowed), this has great consequences for implementation on top of a Virtual Machine
Together, these differences made the original Pascal significantly simpler and safer than C, but less useful (in fact, almost useless) for professional programming. Therefore already as early as 1980, dialects with extensions started to emerge, with Turbo Pascal as dominant version.
Modern implementations of Pascal eliminate nearly all major flaws (and add means for object-oriented programming), making Pascal as useful as C or C++, whilst retaining the characteristic simplicity and safety of the language. However most modern Pascal compilers focus on application development rather than system development, which has different requirements from a programming language.
2. Implemantations
Early approaches (most notably the UCSD p-System compiler, based on the Zürich P4 compiler, both of which were written in Pascal itself) translated Pascal code into a machine-independent p-Code representation. This intermediate code was then interpreted by a program specific to each architecture. As a consequence, only the small interpreter part had to be ported to many architectures.
In the 1980s Anders Hejlsberg wrote the Blue Label Pascal compiler for the Nascom-2. Later he went to work for Borland and rewrote his compiler to become Turbo Pascal for the IBM PC. This new compiler sold for $49.95, which was much less than the price Hejlsberg originally asked for the Blue Label Pascal compiler.
The inexpensive Borland compiler had a large influence on the Pascal community that began concentrating mainly on the IBM PC in the late 1980s. Many PC hobbyists in search of a structured replacement for BASIC used this product. Turbo Pascal, being available only on one architecture, translated directly to Intel 8088 machine code, making it much faster than interpreted schemes.
Super Pascal was a variant which added non-numeric labels, a return statement and expressions as names of types.
During the 1990s compilers that could be re-targeted to different hardware architectures became more prevalent. This allowed for Pascal translation to native machine code that was at the same time easily ported to new hardware.
With Turbo Pascal version 5.5 Borland added object orientation to Pascal.
However, Borland later decided it wanted more elaborate object-oriented features, and started over in Delphi using the Object Pascal draft standard proposed by Apple as a basis. (This Apple draft isn't a formal standard yet.) Borland also called this Object Pascal in the first Delphi versions, but changed the name to Delphi programming language in later versions. The main additions compared to the older OOP extensions were a reference-based object model, virtual constructors and destructors, and properties. There are several other compilers implementing this dialect: see Delphi programming language.

Komentar

Postingan populer dari blog ini

Belajar Pythagoras

Contoh Program Function

MEMBUAT SUDUT 45 DERAJAT DARI GARIS 180 DERAJAT DENGAN JANGKA