Is there a way to ignore the 'Unreachable statement' error?

后端 未结 5 518
耶瑟儿~
耶瑟儿~ 2020-12-13 17:41

Is it possible to somehow ignore this error? I find it much easier to just put return in front of the code I don\'t want to run than to comment it (when the com

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 18:08

    If you want disable/enable certain piece of code many times trick from old C may help you:

    some_code();
    more_code();
    // */
    
    /*
    some_code();
    more_code();
    // */
    

    Now you need only to write /* at the beginning

提交回复
热议问题