Concepts of Programming Languages

(Sean Pound) #1

312 Chapter 6 Data Types


Implementing run-time checks on the possible insecurities of Pascal
data types is discussed in Fischer and LeBlanc (1980). Most compiler
design books, such as Fischer and LeBlanc (1991) and Aho et al. (1986),
describe implementation methods for data types, as do the other program-
ming language texts, such as Pratt and Zelkowitz (2001) and Scott (2000).
A detailed discussion of the problems of heap management can be found
in Tenenbaum et al. (1990). Garbage-collection methods are developed by
Schorr and Waite (1967) and Deutsch and Bobrow (1976). A comprehensive
discussion of garbage-collection algorithms can be found in Cohen (1981)
and Wilson (2005).

REVIEW QUESTIONS



  1. What is a descriptor?

  2. What are the advantages and disadvantages of decimal data types?

  3. What are the design issues for character string types?

  4. Describe the three string length options.

  5. Define ordinal, enumeration, and subrange types.

  6. What are the advantages of user-defined enumeration types?

  7. In what ways are the user-defined enumeration types of C# more reliable
    than those of C++?

  8. What are the design issues for arrays?

  9. Define static, fixed stack-dynamic, stack-dynamic, fixed heap-dynamic, and
    heap-dynamic arrays. What are the advantages of each?

  10. What happens when a nonexistent element of an array is referenced
    in Perl?

  11. How does JavaScript support sparse arrays?

  12. What languages support negative subscripts?

  13. What languages support array slices with stepsizes?

  14. What array initialization feature is available in Ada that is not available in
    other common imperative languages?

  15. What is an aggregate constant?

  16. What array operations are provided specifically for single-dimensioned
    arrays in Ada?

  17. Define row major order and column major order.

  18. What is an access function for an array?

  19. What are the required entries in a Java array descriptor, and when must
    they be stored (at compile time or run time)?

  20. What is the structure of an associative array?

Free download pdf