Smart pascal source code
Type
THelper = Helper For TObject Procedure proc;
begin
WriteLn(ClassName + '.Proc!');
end;
End;
{ main.pas }
Begin
{$IF Declared('THelper.Proc')}
THelper.proc(TObject.Create);
{$ELSE}
{$FATAL 'THelper.Proc is not declared'}
{$ENDIF}
{$IF Declared('THelper.ProcBug')}
{$FATAL 'THelper.ProcBug is declared'}
{$ELSE}
WriteLn('THelper.ProcBug not declared');
{$ENDIF}
{$IF Declared('TObject.Proc')}
TObject.Create.proc;
{$ELSE}
{$FATAL 'TObject.Proc is not declared'}
{$ENDIF}
{$IF Declared('TObject.ProcBug')}
{$FATAL 'TObject.ProcBug is declared'}
{$ELSE}
WriteLn('TObject.ProcBug not declared');
{$ENDIF}
{ <<<<<<<<<<<< CONSOLE OUTPUTS >>>>>>>>>>>>>>>>>>>
TObject.Proc!
THelper.ProcBug not declared
TObject.ProcBug not declared
}