mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-05 22:52:49 +02:00
28 lines
310 B
ObjectPascal
28 lines
310 B
ObjectPascal
program NestedClasses;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
// nested classes/objects
|
|
|
|
type
|
|
TClass1 = class
|
|
type
|
|
Int = Integer;
|
|
TInnerClass = class
|
|
public
|
|
F: Int;
|
|
procedure Test;
|
|
end;
|
|
const
|
|
CInt: Int = 5;
|
|
end;
|
|
|
|
procedure TClass1.TInnerClass.Test;
|
|
begin
|
|
WriteLn(F);
|
|
end;
|
|
|
|
begin
|
|
end.
|
|
|