LAB 5 - Recap Sub Programs (Ch. 6) Decision Structures/...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Recap Sub Programs (Ch. 6) Decision Structures/ Conditional Statements If-Else Statements (Ch. 7, pp. 163 172) Select-Case Statement Conditional & Comparison Operators (Ch. 7, pp. 174) Boolean, Variant data types (Ch. 3, pp. 104) Types of errors (Ch. 10, pp. 257 262) Used when conditions / choices are encountered Syntax (Simple If-Then) : If Condition(s) Then Procedure(s) ----- If TRUE End If Eg.: If A > B Then MsgBox (A is Greater) End If Syntax (Compound If) : Can have any number of ElseIf Statements (but only ONE Else at the very end) If Condition Then Procedure(s) Else Procedure(s) End If If Condition Then Procedure(s)-----Condition-I TRUE ElseIf Condition II Then Procedure(s)-----Condition-II TRUE Else Procedure(s)-----Both FALSE End If Syntax (Select-Case) : Select Case Variable Case (Condition-I) Procedure Case (Condition-II) Procedure Case (Condition-N) Procedure Case Else Procedure End Select Can have any number of Case Statements Case Else is executed when rest are False Good substitute for If-ElseIf Structures...
View Full Document

Page1 / 9

LAB 5 - Recap Sub Programs (Ch. 6) Decision Structures/...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online