mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 07:43:04 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			300 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			300 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
{$mode objfpc}
 | 
						|
program change;
 | 
						|
 | 
						|
type
 | 
						|
  aclasstype = class
 | 
						|
    prop : integer;
 | 
						|
  end;
 | 
						|
 | 
						|
procedure trychange (const aclass : aclasstype);
 | 
						|
begin
 | 
						|
  aclass.prop := 5;
 | 
						|
end;
 | 
						|
 | 
						|
var
 | 
						|
  aclass : aclasstype;
 | 
						|
 | 
						|
begin
 | 
						|
  aclass := AClassType.Create;
 | 
						|
  try
 | 
						|
    trychange (aclass)
 | 
						|
  finally
 | 
						|
    aclass.free;
 | 
						|
  end;
 | 
						|
end.
 |