This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: EE 312 Notes , January 24 2008 Selection o Deciding among alternative executive paths Boolean values stored in variables Tested by program o Using If and Else Statements o Nested and Cascaded If statements o Using Switch Statements o Conditional Operators ’ !! DON T USE Iteration • : Looping idoms o , , While do and for statements Relational Operators < less than < Greater than <= Less than or equal to >= greater than or equal to Value of relational expression is either 1 or 0 Have lower precedence in arithmetic operators Equality Conditions == Equality != Inequality Produce 0 or 1 as their result Boolean Conditions Boolean Values true and false do not exist o – , - false 1 true EE 312 Notes , January 24 2008 An integer variable can store a Boolean value o “ ” int flag o “ = ” flag 1 , To improve readability define constants named true and false o # define TRUE 1 o # define FALSE 0 o . . . . . . ....
View Full Document
This note was uploaded on 03/22/2008 for the course EE 312 taught by Professor Shafer during the Spring '08 term at University of Texas.
- Spring '08