CS 342 Lecture -*- Outline -*- * Introduction ** Dialects of Pascal 1973 Revised report 1982 ISO standard (what is on our machines) "Pascal" means the Pascal of the 1973 revised report, unless stated otherwise ** What to look for in Pascal *** Successful combination of features, simplicity, and eff. Importance isn't new features (most were in Algol W, Algol or Algol 68) *** supports stepwise refinement (top-down design) (ref: Wirth 1971 article in CACM) **** what is stepwise refinement? get them to explain it ... draw abstract refinement tree, connections are datatypes {Program developed in sequence of refinement steps. -starts with specification (find abs. mean of a data set) -refines both algorithms and data in parallel refinements in tasks accompanied by refinement in data used to communicate between tasks recurse for each newly identified task (draw tree) -terminates when all instructions expressed in prog. language} **** relation to design of Pascal ***** refinement of algorithms => procedures, functions, nesting (design is tree structured, nesting reflects that) *scope is procedure (or whole program) *scopes nest -- block structure ***** refinement of data => data structuring permits various refinements: records, variant records, arrays, pointers, sets, enumeration types, subrange types naming of types ***** problem-oriented notation (less of a connection) => both while and repeat-until so can express algorithms more "naturally" (cf. Wirth 71) design method does not dictate language in detail.