PART 3: Decision/Statment

Posts 1–12 of 12 · Page 1 of 1
PART 3: Decision/Statment
The If Statement
Decision is an important part in a program.Without a decision you basically can't do anything.
That's why it is one of the most important statement in a program,the If statement. With logic that If provides, your application can begin to analyze data and make decisions based on that analysis. For example, you make a checkbox and if the checkbox is checked then the program will continue.

If performs one of two possible code actions, depending on the result of the comparison. In other words, If uses comparison operator results to test data. If might execute one or more lines of subsequent code, depending on the result of a comparison.
Before If, the code you wrote executed sequentially, one statement after another. If lets your program be more decisive and execute only parts of the program if the data warrants partial execution.


NOTE:
You always need to do an if like this:
Code:
if checkbox1.checked  = true then
'what you want to do'
End if
It is important to use then and end if.

The If Statement's Else
Whereas If executes code based on the comparison test's true condition, the Else statement executes code based on the comparison test's false condition. Else is an optional part of the If statement. Else specifies the code that executes if the comparison test is false
Example:
Code:
if checkbox1.checked = true then
'what you want to do'
Else
'what you want to do'
End if
PS:
Checkbox1 was just an example.
Thanks i "might" give this so called coding a go.
But it hurts my brain any tips for that?
Quote Originally Posted by [PROTOTYPE] View Post
Thanks i "might" give this so called coding a go.
But it hurts my brain any tips for that?
Watch some TV before
Starting to learn
Would be good you create a thread with all these parts in one.
Quote Originally Posted by Jigsaw View Post
Would be good you create a thread with all these parts in one.
It would be hard to make it after each other.
Code:
If Condition Then
' Your code
End if
I would like to know how to code and it looks so complicate, so I will just wait and use other's hacks because some will know what to do with these tutorials... thanks anyway.
in other words these are the commands?
Thats is the problem @Bernard ... I don't know what to do with these tutorials, but someone will get it and maybe start coding we don't know :P
nice i want part4
Quote Originally Posted by zjenjaz View Post
nice i want part4
I don't know if I succeed to post this tomorrow , I got exams till 24th June so maybe I will be a bit less active these 2 weeks.
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us