tags:

views:

13

answers:

2

I'm trying to add a label I think thats what they are called...

alt text

.. 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 ?

A: 

What is this --->DontPutToDBOrClose:

compiler thinks its a goto label you're defining.

Asad Khan
remember how you were used to define labels like this to jump to code snippets in c....
Asad Khan
Yeah I know, ah well weird.
Jules
A: 

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.

Eric Skroch