Constants are 'placeholders' for values which do not change during execution of a program. You declare it once and use it everywhere with the same value. If you attempt to change the value of the constant within your code, you get a compilation error, that is your program does not compile and you can not execute it.

There are mainly three reasons to use constants:

  1. You could give a much more reasonable name to the value, so that even the name represents what the value wants to represent . Your program becomes much more readable, English.
  2. If it is a difficult to write value, just like a real value with high precision, than giving a short name to it could be a relief to you, and you could decrease the number of errors made due to mistakes.
  3. Moreover, if we change the value of a constant in the code, we also change the value of that constant wherever it occurs in the program, so we don't have to look for this value to change everywhere..
The declaration of a constant comes before the variable declaration part. You don't have to specify the type of the constant. The assignment operator in this case is =, in constrast to variable assignments where the assignment operator is :=. The general constant declaration is as follows:

Syntax

It is recommended that you print them out, if possible, and have them always on your wall or any place where you can see them most of the time.
An example declaration could be: 
const
pi = 3.141592654
var {not in constant declaration part anymore} 
i:real;
begin
i:=pi*2; {Here i gets the value 2*3.141592654}
end.
 
A First Look A First Look at Pascal Basic Input/Output Identifiers & Types
Constants Standard Functions If..Then Statement Case Statement
Repetitions Procedures and Functions Enumerated /Subrange Types Sets
I/O, Text Files Arrays Records Recursion
Pointer How to Debug Previous Exam Questions Advanced
ASCII Code Table Homepage University Homepage Computer Engineering Dept.