Summary
Keywords: pame

Subsections

- Exercises

#
Summary

An Algol 68 program manipulates values. A value is characterised by its mode. A mode is indicated by a mode indicant. Plain values can be denoted. Values occur in contexts, and can sometimes be coerced into values of different modes. Identifiers can be linked to values using identity declarations. The values manipulated by a program are called internal values. External values are data used by, or produced by, a program. Comments describe a program, but add nothing to its elaboration.

Finally, here are some exercises which test you on concepts you have met in this chapter.

## Exercises

1.15 Give denotations of the following values: Ans

(a)
  one thousand nine hundred and ninety six.
(b)
  The fifth letter of the lower-case Roman alphabet.
(c)
  The fraction 1/7 expressed as a decimal fraction to 6 decimal places.

1.16 Is there anything wrong with the following mode indicants? Ans

(a)
  `C H A R`
(b)
  `INT.CHAR`
(c)
  `THISISANEXTREMELYLONGMODEINDICANT`
(d)
  `2CHAR`

1.17 Write suitable identity declarations for the following identifiers: Ans

(a)
  `fifty five`(b)
  `three times two point seven`
(c)
  `colon`

1.18 Is there anything wrong with the following identity declarations?

       REAL x = 1.234,
            y = x;

Ans

1.19 What is the difference in meaning between `0` and `0.0`? Ans

1.20

Write a program containing `print` phrases to print the following values on your screen, separated by one space between each value:

       0.5 "G" 1 ":" 34000000

Ans