Computer Studies‎ > ‎Turing‎ > ‎Turing Tutorial‎ > ‎

Turing 020 — Constants

Occasionally we may wish to use a variable that does not change inside the program. Examples this would be variables like PI or PST.

To use a constant, declare it as follows:

const PST : real := 0.07 % PI is now a constant

Assignment

Modify program 019.t so it uses a constant instead of a variable.

Save as "020.t".
Comments