mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 02:39:40 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			406 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			406 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
{$mode delphi}
 | 
						|
 | 
						|
var 
 | 
						|
 x : integer = 34;
 | 
						|
{ this is the way Delphi creates initialized vars
 | 
						|
  ++ its much more logical then BP 
 | 
						|
  typed const !! 
 | 
						|
  -- its incompatible with BP !! (PM) }
 | 
						|
 | 
						|
 y : array[0..2] of real = (0.0,1.23,2.56);
 | 
						|
 | 
						|
{ these are true const in Delphi mode and thus 
 | 
						|
  it should not be possible to change ! }
 | 
						|
 | 
						|
const
 | 
						|
 z : real = 45.2;
 | 
						|
 | 
						|
begin
 | 
						|
 y[2]:=z;
 | 
						|
 { this should be refused ! }
 | 
						|
 z:=y[1];
 | 
						|
end. |