if / else function one time button

Hello.

I have an arduino uno and i want to enable something with the if/else function but i dont want to use a switch.I want to use a button but after the button releases,its function is still enabled.Can anyone help me with that?

but i dont want to use a switch.I want to use a button

You'll need to explain how a plastic shirt button is going to be better than a switch.

but after the button releases,its function is still enabled.

I'm going to guess that you have not looked at the state change detection example. You should.

apple32:
Hello.
I have an arduino uno and i want to enable something with the if/else function but i dont want to use a switch.I want to use a button but after the button releases,its function is still enabled.Can anyone help me with that?

We’re not mindreaders. Post your code.

You could be more precise! I think you want the "break;" statement to exit a loop or the "return;" statement to exit a function.

you should use something like the Button State Change example shows: http://arduino.cc/en/Tutorial/ButtonStateChange

Like this you can make something like, for example, when you click a button a LED will light (or any other function that you want). The LED will stay on. When you click the button again the LED will turn off. and it will stay off...

;)