Revision history for TutIfStatement


Revision [22230]

Last edited on 2018-02-11 11:45:06 by JeffMarshall [escape camel-case words]
Additions:
The Not bitwise operator can be a problem in an If statement. You may be used to writing //If Not var Then//, with Not performing a logical, rather than a bitwise operation. In ""FreeBASIC"" Not performs a bitwise operation, not a logical operation.
Deletions:
The Not bitwise operator can be a problem in an If statement. You may be used to writing //If Not var Then//, with Not performing a logical, rather than a bitwise operation. In FreeBasic Not performs a bitwise operation, not a logical operation.


Revision [22204]

Edited on 2018-02-10 13:34:00 by JeffMarshall [escape camel-case words]
Additions:
In this format if <expression> is True then the code following the Then is executed. If the answer is False then the ""ElseIf"" is executed. If the ""ElseIf"" is True, the code following the Then (of the ""ElseIf"") is executed, otherwise the code following the End If is executed. You can have as many ""ElseIf"" statements as you need to fully cover the range of questions you need to ask.
This format is a combination of all the other formats. If <expression> is True then the code following the Then is executed. If the answer is False then the ""ElseIf"" is executed. If the ""ElseIf"" is True, the code following the Then (of the ""ElseIf"") is executed, otherwise the code following the Else is executed.
When using compound conditions care must be taken to ensure that the conditions do not overlap. In most cases overlapping conditions will produce unpredictable results. Each condition must produce a unique result, and the combination of the individual results, must itself express a unique result. This is very important in If-""ElseIf"" constructs; an overlapping condition within an If-""ElseIf"" block may execute the wrong code at the wrong time.
Deletions:
In this format if <expression> is True then the code following the Then is executed. If the answer is False then the ElseIf is executed. If the ElseIf is True, the code following the Then (of the ElseIf) is executed, otherwise the code following the End If is executed. You can have as many ElseIf statements as you need to fully cover the range of questions you need to ask.
This format is a combination of all the other formats. If <expression> is True then the code following the Then is executed. If the answer is False then the ElseIf is executed. If the ElseIf is True, the code following the Then (of the ElseIf) is executed, otherwise the code following the Else is executed.
When using compound conditions care must be taken to ensure that the conditions do not overlap. In most cases overlapping conditions will produce unpredictable results. Each condition must produce a unique result, and the combination of the individual results, must itself express a unique result. This is very important in If-ElseIf constructs; an overlapping condition within an If-ElseIf block may execute the wrong code at the wrong time.


Revision [22176]

Edited on 2018-02-07 00:29:41 by sancho3 [escape camel-case words]
Additions:
//Last Reviewed By ""Sancho3"", February 06, 2018//
Deletions:
//Last Reviewed By Sancho3, February 06, 2018//


Revision [22175]

Edited on 2018-02-07 00:28:32 by sancho3 [escape camel-case words]
Additions:
Editors Note: See also [[KeyPgOpAndAlso|AndAlso]] and [[KeyPgOpOrElse|OrElse]]


Revision [22174]

Edited on 2018-02-07 00:21:57 by sancho3 [escape camel-case words]
Additions:
//Last Reviewed By Sancho3, February 06, 2018//


Revision [20690]

Edited on 2016-02-10 16:15:02 by DkLwikki [Update link format]
Additions:
//Written by [[WikiRick|rdc]]//
The <expression> is the question that needs an answer and you frame the question using [[CatPgOperators|logical operators]].
Deletions:
//Written by [[WikiRick rdc]]//
The <expression> is the question that needs an answer and you frame the question using [[CatPgOperators logical operators]].


Revision [15544]

Edited on 2011-12-10 20:34:33 by CountingPine [“” -> ""]
Additions:
The Iif, or "immediate If" function returns one of two numeric values based on an expression. You can think if the Iif function as an in-line If statement that acts as a function call.
Deletions:
The Iif, or “immediate If” function returns one of two numeric values based on an expression. You can think if the Iif function as an in-line If statement that acts as a function call.


Revision [10417]

The oldest known version of this page was created on 2007-07-31 11:46:48 by JeffMarshall [“” -> ""]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode