iPhone, label at end of compound statement
I'm trying to add a label I think thats what t开发者_Go百科hey are called...
.. 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.
精彩评论