Chapter 2 Outcomes
Basic Programming Language Concepts


After completing this chapter and participating in class, you should be able to accomplish each of the following outcomes.

Knowledge Outcomes

  1. Define each of the key terms listed in the chart below.

  2. reserved words keywords identifiers or names
    Extended Backus-Naur
    Form (EBNF)
    metalanguage production rules
    syntactic variables terminal tokens simple data types
    int real string
    boolean exponent form ** + - / *
    precedence of operations div round
    truncation mod catenation
    "+" operator overload length repeat
    comparison operators logical operators initialize variables
    enum succ pred
    ord output formatting comments

  3. State the two rules for creating identifiers. Discuss the role of upper and lower case letters when creating identifiers (2.1).

  4. In the metalanguage definition (2.1), state the purpose of each of the following symbols:

  5. State the four simple data types found in Turing, and give examples of how they are used (2.2).

  6. Name the two limitations that immediately occur when a variable is declared (2.3).

  7. Understand and distinguish between each of the following (2.4):

  8. State the order of precedence and the purpose of each of the following arithmetic operators (2.4):

  9. Explain the use of catenation and substring selection (2.4).

  10. Explain why the + operator is said to be overloaded (2.4).

  11. Describe how the length of a string can be determined (2.4)

  12. State the 6 comparison operators, and the 2 logical (boolean) operators (2.4).

  13. Describe the general form of an assignment statement and give examples of int, real, string, and boolean assignment statements (2.5).

  14. Describe what is meant when a boolean assignment is short circuited (2.5).

  15. State the purpose of constants (2.5).

  16. Explain what each of the following commonly used assignment statements accomplish (2.5):

  17. Describe how to use the enumerated data type, including the use of the succ, pred, and ord functions (2.5).

  18. Describe the method used to correctly output tables of numbers or words using output formatting (2.6).

  19. Discuss the importance of comment statements in all programs (2.7).

Skills Outcomes

  1. Take smaller sections of a string from a larger string, and build large strings from smaller strings (2.4).

  2. State the purpose of the repeat function and show how it is used (2.4).

  3. Show how assignment statements can be combined with variable declarations to initialize the value of the variable (2.5).