CnPack Forum


 
Subject: 代码格式化工具无法正确处理条件定义的语句
yinsim
新警察
Rank: 1



UID 50783
Digest Posts 0
Credits 42
Posts 14
点点分 42
Reading Access 10
Registered 2010-8-17
Status Offline
Post at 2017-1-14 18:06  Profile | Blog | P.M. 
代码格式化工具无法正确处理条件定义的语句

CnPack的代码格式化工具无法正确处理条件定义的语句,比如如下面所示的代码,希望开发组有空修复下,谢谢!

procedure TFrom1.Button1Click(Sender: TObject);
{$IFNDEF DEBUG}
begin
  ShowMessage('A');
end;
{$ELSE}
begin
  ShowMessage('B');
end;
{$ENDIF}



Image Attachment: 2017-01-14_180235.png (2017-1-14 18:06, 2.32 K)

Top
Mike1234567890
普通灌水员
Rank: 2



UID 67481
Digest Posts 0
Credits 65
Posts 21
点点分 65
Reading Access 10
Registered 2012-3-21
Status Offline
Post at 2017-1-20 10:23  Profile | Blog | P.M. 
此问题我也遇到了,也提交了错误,请修复

Top
Mike1234567890
普通灌水员
Rank: 2



UID 67481
Digest Posts 0
Credits 65
Posts 21
点点分 65
Reading Access 10
Registered 2012-3-21
Status Offline
Post at 2017-1-23 10:52  Profile | Blog | P.M. 
这个问题还没有处理吧,我刚才升级了一下每日构建版,问题依旧

Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6383
Posts 3369
点点分 6383
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2017-1-25 22:33  Profile | Blog | P.M. 
代码格式化选项里有个“编译指令处理方式”,改改试一试?
Top
Mike1234567890
普通灌水员
Rank: 2



UID 67481
Digest Posts 0
Credits 65
Posts 21
点点分 65
Reading Access 10
Registered 2012-3-21
Status Offline
Post at 2017-2-10 10:00  Profile | Blog | P.M. 
设置只处理第一个分支,确实不报错了,不过如下图这样选择,会把结尾的{$ENDIF}给整没了,请修正。


Image Attachment: [源码选择] QQ图片20170210095847.png (2017-2-10 10:00, 12.82 K)

Top
 




All times are GMT++8, the time now is 2017-8-23 23:43

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.025718 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP