开发者

iPhone, label at end of compound statement

I'm trying to add a label I think thats what t开发者_Go百科hey are called...

iPhone, label at end of compound statement

.. just like I've done several times before to exit a function without processing some code and I'm getting the error 'label at end of compound statement' why ? what do i need to do instead ?


What is this --->DontPutToDBOrClose:

compiler thinks its a goto label you're defining.


You can't have a label hanging by itself at the end of the method--it has to have at least one valid statement following it. If you need to skip over some code and return early, just use return. You can use as many return statements as you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜