cnwizards icon indicating copy to clipboard operation
cnwizards copied to clipboard

Error using Code Formatter on Delphi XE3

Open thecocce opened this issue 10 years ago • 1 comments

When i use Code Formatter on this unit i receive an error:

Format Error (15,1):Symbol Excepted.
Current: "Interface"

i tried the integrated CF inside XE3 and it works properly.

// VCL uses section
{$IFNDEF FMX}
unit Unit1;
{$INCLUDE vcl.inc}

interface

uses
  adodb, activex, Classes, db, SysUtils, Math;

// FMX uses
{$ELSE FMX}
{$INCLUDE fmx.inc}

interface

uses
  System.Classes, Data.db, System.SysUtils, System.Math, System.zlib;
{$ENDIF FMX}

type
  TMyClass = class

  end;

implementation

end.

thecocce avatar Sep 03 '15 08:09 thecocce

We can't process complex compiler directives and treat them as comments, so there will be 2 interface keywords in the unit above and error occurs.

shanzhashu avatar Sep 04 '15 23:09 shanzhashu