I'm using the Documentation Insight feature to document a Delphi library, currently this work fine with Delphi 2005 to XE3. Now I want to add support for old versions of Delphi (5, 6, 7) too.
But when try to compile a code like this in Delphi versions minor than 2005 (Delphi 5, 6, 7)
{$REGION 'Documentation'}
/// <summary>
/// This is a sample text
/// </summary>
{$ENDREGION}
TFoo=class
procedure Tick;
end;
I receive a compiler error
Invalid Compiler Directive REGION
What is fine because the REGION
reserved word was introduced when the Delphi IDE was Changed to Galileo (Delphi 2005).
So, for now as workaround I'm using this syntax in order to compile the code in Delphi 5 - to XE3.
{$IFDEF NODEF}{$REGION 'Documentation'}{$ENDIF}
/// <summary>
/// This is a sample text
/// </summary>
{$IFDEF NODEF}{$ENDREGION}{$ENDIF}
TFoo=class
procedure Tick;
end;
But now using such code the Documentation Insight no longer works in Delphi XE2 and XE3.
So the question is, How i can compile documented Delphi code in older versions of Delphi without affect Documentation Insight in the newer Delphi versions?