Skip to main content
Top

1997 | Book

Migrating from Pascal to C++

Authors: Susan M. Merritt, Allen Stix

Publisher: Springer New York

Book Series : Undergraduate Texts in Computer Science

insite
SEARCH

About this book

Many students and programmers familiar with Pascal are now looking to upgrade their skills to a well-structured object-oriented programming language such as C++. This textbook provides such an "upgrade path" by presenting a course on C++ in the spirit of structured programming. Both authors teach this material to a wide variety of students and include numerous programming exercises to test a reader's understanding and to increase their confidence in programming in C++.

Table of Contents

Frontmatter
1. C++ as Structured Programming: An Historical Perspective
Abstract
C++ can be learned as a structured object-oriented programming language, and can be particularly well learned that way by the Pascal programmer.
Susan M. Merritt, Allen Stix
2. The C++ Subset That Covers Pascal
Abstract
A frustrating part of beginning a new language is struggling to find the data structures, control structures, and embedding syntax required for the level of computational expressiveness to which one is accustomed. The aim of this chapter is to introduce that kernel of C++ which spans Pascal. Because this kernel is Pascal-like, Pascal programmers can learn it quickly and feel comfortable in C++ in short order. Familiarity with C is not required.
Susan M. Merritt, Allen Stix
3. Procedural C++ That Extends Pascal
Abstract
Equipped with the C++ subset that covers Pascal, one can write any program in C++ that could have been written in Pascal. Reading code that others have written, however, leads to a discovery of additional operators, the use of dynamic allocation to enable the definition of nonlocal variables (i.e., nonlinked storage with a lifetime exceeding that of the function), and new capabilities of functions beyond those in Pascal. These are the topics discussed in Sections 3.1, 3.2, and 3.3, respectively. The purpose of this chapter is not to provide an exhaustive survey of the entire nonobject part of C++ (which includes C). The aim is to highlight those useful language structures that are characteristic of C++ that lack direct analogues in Pascal.
Susan M. Merritt, Allen Stix
4. C++ and Object-Oriented Programming
Abstract
So far in this book, the programming that has been done is conventional, or procedural, in fact, structured (using “a better C”), and analogous to Pascal with many convenient extensions. As everyone knows, structured programming can accomplish any programming job, and is certainly not obsolete. Structured programming uses both algorithms and data structures; although the programmer attends to both, the focus is probably on the algorithms.
Susan M. Merritt, Allen Stix
5. Templates
Abstract
Templates enable the construction of parameterized classes and functions. They extend abstraction: procedural and data abstractions can be built without type information; the information is specified by the user.
Susan M. Merritt, Allen Stix
Backmatter
Metadata
Title
Migrating from Pascal to C++
Authors
Susan M. Merritt
Allen Stix
Copyright Year
1997
Publisher
Springer New York
Electronic ISBN
978-1-4612-1902-6
Print ISBN
978-1-4612-7332-5
DOI
https://doi.org/10.1007/978-1-4612-1902-6