Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > Pascal programming language


 Contents
Pascal is one of the landmark computer 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.

The Swiss computer scientist Niklaus Wirth developed Pascal in 1970, first as a hypothetical language that would encourage students to write structured code. Pascal is based on the Algol programming language and is named in honor of mathematician and philosopher Blaise Pascal. Wirth also developed Modula-2 and Oberon, languages similar to Pascal which also support object-oriented programming.

1 Overview

All Pascal programs start with the "Program" keyword, an optional list of internal filedescriptors and then a block of code is indicated with the "Begin" / "End" keywords. Letter caseIn orthography and typography, letter case (or just case is the distinction between majuscule capital or upper-case and minuscule lower-case letters. Most Occidental languages (certainly those based on the Latin, Cyrillic, Greek and Armenian alphabets) us is ignored in the Pascal language. SemicolonA semicolon ; is a punctuation mark. History The semicolon was invented by an Italian ( 1450- 1515) printer named Aldus Manutius the elder. He used it to separate words opposed in meaning and to mark off interdependent statements. The earliest general uses separate statements, and the full stopA full stop or period also called a full point is the punctuation mark commonly placed at the end of several different types of sentences in English and several other languages. A period consists of a small dot placed at the end of a line of text, thus: " ends the program (or unit). For some compilerA compiler is a computer program that translates a computer program written in one computer language (called the source language into an equivalent program written in another computer language (called the output or the target language . Introduction and hs the 'Program' line is optional.

Pascal, in its original form, is a purely procedural language with the standard array of if, while, for, and related constructs.

Turbo Pascal, and other derivatives with units or module concepts are modular languages . Turbo Pascal copied these concepts from either a draft of the Extended Pascal standard or Pascal's successor Modula-2, however doesn't provide a nested module concept.

2 Hello World

program HelloWorld(input,output); begin Writeln('Hello, World!'); end.

Notes: It is not nessesary to add 'input,output'

3 Pascal and C

Pascal was developed about the same time as CThe C Programming Language Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a low-level standardized programming language developed in the early, 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 safetyIn computer science, a programming language is type safe when the language does not permit the programmer to treat a value as a type to which it does not belong. This generally requires that the language have a complete specification of its semantics; thi 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:

Together, these differences made Pascal significantly simpler and safer than C, but less useful (in fact, almost useless) for professional programming. However, modern implementations of Pascal eliminate its flaws (and add means for object-oriented programming), making Pascal as useful as C or C++, but also as complicated as these.



Read more »

Non User