Simple question about turning on a led.

Yeah, i need right that. But i don't know how i can do it. I understand that i should create a variable called "oldstate", but what kind of value i've to give to it? Can you show me a code example?

thank you very much, my friend!