Difference between revisions of "Identifier"

From Free Pascal wiki
Jump to navigationJump to search
m
Line 8: Line 8:
 
program WittsEnd;
 
program WittsEnd;
 
const  
 
const  
   Y=2;
+
   Y = 2;
 
var  
 
var  
 
   Plugh: Integer;
 
   Plugh: Integer;
Line 17: Line 17:
  
 
begin
 
begin
   Plugh := Y*2;
+
   Plugh := Y * 2;
 
end.
 
end.
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 22:51, 12 July 2018

Deutsch (de) English (en) suomi (fi) français (fr) русский (ru)

An identifer is a symbol used in a Pascal program which consists of letters, numbers and certain special characters, used to indicate a specific variable, constant, object, record, type, procedure or function.

For example, in the following piece of code:

program WittsEnd;
const 
  Y = 2;
var 
  Plugh: Integer;

procedure Xyzzy;
begin
end;

begin
  Plugh := Y * 2;
end.

we can say that

  • WittsEnd
  • Y
  • Plugh
  • Xyzzy

Are all identifiers.