Tool/software: Code Composer Studio
I've only recently started programming in my course and I'm having trouble understanding the way the code is written.
First question I have: when i write an if statement, does it always need an else for it to work or can i just leave it out?
second question: i've seen things written like:
if (P2IN & BIT6)
{
P1OUT | = BIT0
}
my question is, what are they braces doing? are they necessary and if i don't have them in code like that, will it not function properly?
thanks