在开发时我经常需要多个嵌套的多行(或“部分行”)注释.
Xcode最近可能引入了世界上最令人讨厌的警告 – 它迫使我禁用“警告为错误”.我猜这个警告是为了捕捉一个非常罕见的情况,当有人打字错误并导致一个块评论没有结束 – 但IME还有许多其他问题将导致这将很快揭示它.
一些例子:
/* removed while debugging the BARFOO -(void) aMethod { [self methodCall:7.0 /* needed to FOO the BAR: */ * self.multiplier * /* double for hi-res:*/ 2.0]; } */
和:
/* removed while debugging the BARFOO /** This method has DOCUMENTATION */ -(void) aDocumentedMethod { ... } -(void) aMethod { /** internally,we have to BAR BAR the FOOFOO. 1. BAR 2. BARBAR 3. Finally,FOOOFOO */ ...complex lines of source here... } */
当然,调试时非常简单的双注释.
但我无法在Xcode5中找到一个禁用此警告的位置 – 它似乎不存在于任何列出的警告中:(?