Several derivatives of Pascal exist which enhance the language, such as Object Pascal.
Here is an example of the 100 doors problem:
program OneHundredDoors; var doors : Array[1..100] of Boolean; i, j : Integer; begin (* Initialize the array of doors to closed *) for i := 1 to 100 do doors[i] := false; (* Process the doors *) for i := 1 to 100 do begin j := i; while j <= 100 do begin doors[j] := not doors[j]; j := j + i end end; (* Print out the results *) for i := 1 to 100 do begin Write('Door #', i, ' is '); if doors[i] then WriteLn('open.') else WriteLn('closed.'); end; end.
Pascal is considered to be one of a few languages which one can learn completely. The language is deliberately limited and (by default) there are few external libraries. In this sense, learning Pascal is a finite process.
Pascal has a simple syntax and easy to understand type system. Programs are generally fairly easy to read and write.
Pascal is a fairly well established language, but is also not very modern.