1.6: High-Level Languages

High-level languages provide basic data structures and operations and the capability of using these to build more complex data structures and operations. With some languages it can be hard to realize this capability, while with others it is relatively effortless. In addition, languages have different idiosyncrasies and subtle shortcomings. In this text, the focus is not on the language but on the more general topics of program structure and data structure selection. Still, whatever background you have in high-level languages may be helpful.

A program written in a high-level language specifies a series of operations to be performed on data structures. Think of a high-level language as having an associated high-level computer that carries out those operations and stores those data structures in its memory. Such high-level computers are just a concept?/FONT>normally they are not built. The conventional computer is not specifically a C, Cobol, Pascal, or FORTRAN machine; we rely on compilers to translate programs from high-level languages into the languages of existing computers. The translated version is then executed by the conventional computer. The compiler, in effect, makes the conventional computer appear to be a high-level computer for the high-level language.

To do this translation, the compiler must find a way to represent the program's data structures, using those in the conventional computer's language. lt must also apply operations of the conventional computer's language to these representations to simulate the program's operations on its data structures. How this is done, or what the actual computer is, does not affect the correctness of programs written in the high-level language. This is data abstraction par excellence! However, the way this is done will influence the storage requirements and execution time of the program. It can also cause problems for the unwary user.

1.6.1 Data Types

1.6.2 Data Representation