Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.