Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ryan Piercy Jon Hooker. Invented by Nicklaus Wirth Named After Blaise Pascal Pascal’s Triangle Invented a Digital Computer.

Similar presentations


Presentation on theme: "Ryan Piercy Jon Hooker. Invented by Nicklaus Wirth Named After Blaise Pascal Pascal’s Triangle Invented a Digital Computer."— Presentation transcript:

1 Ryan Piercy Jon Hooker

2 Invented by Nicklaus Wirth Named After Blaise Pascal Pascal’s Triangle Invented a Digital Computer

3 Why? No Structured Languages Expensive Compilers Make Programming Accessible

4 Popular at Universities Educational Testing Service Standard on AP Tests until 1999 Borland Releases Turbo Pascal Lightning Fast Thousands of Lines per Minute Object Pascal/Delphi

5

6 Strongly Typed Strict Compiler Good for Beginners – Specific Error Messages integer real char Boolean

7 Subranges/One-Dimensional Arrays intarray = array[1..10] of integer Multi-Dimensional Arrays Declaration : datatype = array[enum1, enum2, etc.] Use : datatype[1, 2]

8 Record type InfoType = record Name : string; Age : integer; City, State : String; Zip : integer; end;

9 Uses Dot Operator recordtype.fieldname Also Can Access Multiple Fields with recordtype do Begin field := value field2 := value End;

10 Allocate Memory: New (PointerVariable) Linked List Using Record/Pointers type PointerType = ^RecordType; RecordType = record data : integer; next : PointerType; end;

11

12 Pros Syntactically similar to C and ALGOL, upon which Pascal is based Data is strongly typed and declared Good balance of orthogonality (few methods of accomplishing similar tasks) Recognizable statement structure and keywords (loops, if, while, etc.) Relatively simple, good for structured learning of other languages

13 Cons Semicolons separate statements instead of terminating them Extensive nested procedures are allowed Identifiers are not case-sensitive: MyLabel vs. mylabel vs. mYlAbeL

14 Pros Purely procedural, but other derivations are designed for other paradigms (object-oriented) Function vs. Procedure: functions return values, procedures do not Blocks are denoted using keywords begin and end

15 Cons Semicolon placement can be confusing Treatment of arrays: array size is part of the type at declaration, making it impossible to define utility functions/procedures that utilize arrays of any data- dependent length, a severe limitation, especially in handling strings

16 Pros Provides run-time type checking, including bounds checking on arrays Strongly typed variables Allows pointers, but with limitations (can only reference dynamic variables, must have an associated type, etc.) Good exception handling

17 Cons None Used for Education Needs to be Safe and Reliable

18 Pros Familiar and recognizable C-like syntax Easy to learn, so training is cheap Several compilers and interpreters are available to the public for free Delphi, Free Pascal, Lazarus, and Turbo Pascal are examples

19 Easy to maintain/update due to high readability and ease of understanding Cons Many variations to incorporate different paradigms (object-oriented)

20 Scientific Instrumentation Companies Database Administrators Beginning Programming Courses Nostalgia Buffs

21 Java Job Listings Pascal Job Listings

22 http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol2/mk8/article2.html#P http://en.wikipedia.org/wiki/Pascal_(programming_language) http://en.wikipedia.org/wiki/Comparison_of_Pascal_and_C#Functions.2Fprocedures http://www.freepascal.org/docs-html/ref/ref.html http://taoyue.com/tutorials/pascal/history.html Nance, Douglas W. (1998). Fundamentals of Pascal. Cincinnati: South-Western Ed. Pub.


Download ppt "Ryan Piercy Jon Hooker. Invented by Nicklaus Wirth Named After Blaise Pascal Pascal’s Triangle Invented a Digital Computer."

Similar presentations


Ads by Google