Notes - 1.24 - EE 312 Notes , January 24 2008 Selection o...

Info iconThis preview shows pages 1–3. 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
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 5

Notes - 1.24 - EE 312 Notes , January 24 2008 Selection o...

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

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