6-SummarySoFar

6-SummarySoFar - Flow of Control(our Programming Toolbox so...

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

View Full Document Right Arrow Icon
Flow of Control (our Programming Toolbox so far….) Slides originally developed by Delores M. Etter and Jeanine A. Ingber 
Background image of page 1

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

View Full DocumentRight Arrow Icon
What is Flow of Control? Flow of Control is the use logic (by a computer) to determine which path to take through a program A Program Consists of a set of instructions Has multiple paths that can be taken, based on certain conditions determined at “run-time” A program’s instructions are fetched and executed by a processor in a sequence determined at “run-time” Instructions are said to “flow” through the processor, hence Flow Control
Background image of page 2
What is Flow of Control? Computer logic works just like it does for us: if (A ), then B ; if (X ), then Y ; if (M ), then N if (A ), then B , otherwise C while (A ), do B The items in ( )’s are logical conditions or “Boolean Expressions” and the underlined items are statements
Background image of page 3

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

View Full DocumentRight Arrow Icon
Boolean Expressions Computers use Boolean Expressions to precisely define conditions which ultimately control program execution Boolean Expressions Evaluate to either True or False Are mainly created using Relational and Logical Operators
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/03/2011 for the course EAS 230 at SUNY Buffalo.

Page1 / 24

6-SummarySoFar - Flow of Control(our Programming Toolbox so...

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