Declaring Class inline |
Smart pascal source code
function test: string; begin type a = class a1: string; a2: integer; end; var toto := a.Create; toto.a1 := 'hello'; toto.a2 := 123; Result := toto.ClassName; Writeln(toto.a1); Writeln(toto.a2); end; { unit1.pas } Begin Writeln(test); { CONSOLE OUTPUTS hello 123 a }