reCT

The only ByteSpace Project big enough to have its
own Website

If Statements

If statements are a way to Block off code behind a Condition.

A typical If statement could look something like this:

if (someVar = "a value")
{
    //do something
}


Else Block

You can also add an Else block, that will be run if the Condition doesn't return true.

if (someVar = "a value")
{
    //do something
}
else
{
    //do something else
}

If you want you can also chain another If Statement onto it like this:

if (someVar = "a value")
{
    //do something
}
else if (someVar = "another value")
{
    //do something else
}