labels and procedures - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

labels and procedures

wizarbowizarbo Posts: 29Member
I am familiar with labels and how to use them but i tried to use one inside of a procedure and it says [red]"Label not within current block"[/red] I want the label to go outside of the procedure too so if anyone knows how to do this I'd appreaciate it! Thanks for your time!!!

Comments

  • Phat NatPhat Nat Posts: 757Member
    : I am familiar with labels and how to use them but i tried to use one inside of a procedure and it says [red]"Label not within current block"[/red] I want the label to go outside of the procedure too so if anyone knows how to do this I'd appreaciate it! Thanks for your time!!!
    :

    I'm not positive (and don't have a copy of TP around right now) but you should be able to call a label outside of your function by declaring it globally (aka at the top below your uses clause). The other thing is, do you really need to use a label? Usually it can be done other ways, but I don't know the situation. Hope this helps.

    Phat Nat

  • ManningManning Posts: 1,621Member
    : I am familiar with labels and how to use them but i tried to use one inside of a procedure and it says [red]"Label not within current block"[/red] I want the label to go outside of the procedure too so if anyone knows how to do this I'd appreaciate it! Thanks for your time!!!
    :

    You cant jump from one procedure to another under any circumstances as far as I know.

    And even if you could, it is absolutely going to cause spaghetti code. Proper use of goto can be a good thing, but I dont see how jumping procedures could ever be considered proper use. You should definitely look into restructuring your procedures if you cant see another immediate solution.
Sign In or Register to comment.