Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery.

Slides:



Advertisements
Similar presentations
Selection Feature of C: Decision making statements: It allow us to take decisions as to which code is to be executed next. Since these statements control.
Advertisements

Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Chapter 4: Control Structures I (Selection)
Control Flow Statements: Repetition/Looping
CS 101 Introductory Programming - Lecture 7: Loops In C & Good Coding Practices Presenter: Ankur Chattopadhyay.
Chapter 13 Control Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Control Structures Conditional.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /15/2013 Lecture 11: MIPS-Conditional Instructions Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Week 6 - Programming I So far, we’ve looked at simple programming via “scripts” = programs of sequentially evaluated commands Today, extend features to:
IS437: Fall 2004 Instructor: Dr. Boris Jukic Program Flow Control: Decisions and Conditions (Branching) Controlled Repetition (Looping)
PZ07B Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ07B - Basic statements Programming Language Design.
Week 10 Recap CSE 115 Spring For-each loop When we have a collection and want to do something to all elements of that collection we use the for-each.
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
C++ for Engineers and Scientists Third Edition
Python – Making Decisions Lecture 02. Control Structures A program that only has one flow is useful but limited. We can use if statements to make these.
Oracle10g Developer: PL/SQL Programming1 Objectives Programming fundamentals The PL/SQL block Define and declare variables Initialize variables The NOT.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 2 Basic PL/SQL Block Structures.
Selection Programming EE 100. Outline introduction Relational and Logical Operators Flow Control Loops Update Processes.
Fortran 2- More Basics Chapter 3 in your Fortran book.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 4 Decision.
CPS120: Introduction to Computer Science Decision Making in Programs.
Control Structures By Shyam Gurram. Control Structure In this chapter we have two different types of structures. Conditional Structure Iterative Control.
ㅎㅎ logical operator if if else switch while do while for Third step for Learning C++ Programming Repetition Control Structures.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
Conditional Expression One of the most useful tools for processing information in an event procedure is a conditional expression. A conditional expression.
EMT 2390L Lecture 9 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 7 Conditionals and Loops 4/18/09 Python Mini-Course: Day 2 - Lesson 7.
CSC115 Introduction to Computer Programming Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Introduction to branching.
Advanced Program Design. Review  Step 1: Problem analysis and specification –Specification description of the problem’s inputs and output –Analysis generalize.
Chapter 15 JavaScript: Part III The Web Warrior Guide to Web Design Technologies.
Chapter 4 Control Structures I. Chapter Objectives Learn about control structures Examine relational and logical operators Explore how to form and evaluate.
CSI 3125, Preliminaries, page 1 Control Statements.
Pseudocode. Algorithm A procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Presentation By :- Nikhil R. Anande ( ) Electronic & Communication Engineering. 3 nd Year / 5 th Semester FACULTY GUIDE : RAHIUL PATEL SIR MICROCONTROLLER.
Basic statements Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
 Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do.
Loops causes program to execute the certain block of code repeatedly until some conditions are satisfied. Suppose you want to execute some code/s 10 times.
Sensor Information: while loops and Boolean Logic.
VB Script V B S.
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Visual Basic 6 (VB6) Data Types, And Operators
Sequence, Selection, Iteration The IF Statement
C-Language Lecture By B.S.S.Tejesh, S.Neeraja
Oracle11g: PL/SQL Programming Chapter 2 Basic PL/SQL Block Structures.
Chapter 6 More Conditionals and Loops
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
Topics The if Statement The if-else Statement Comparing Strings
If, else, elif.
CSC115 Introduction to Computer Programming
Chapter 5 Structures.
For Loops October 12, 2017.
Topics The if Statement The if-else Statement Comparing Strings
IF if (condition) { Process… }
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
LabVIEW.
CS139 October 11, 2004.
Visual Basic – Decision Statements
Selection Statements.
Conditionals.
Program Flow.
Chapter 5 – Decisions Big Java by Cay Horstmann
statement. Another decision statement, , creates branches for multi-
Basic statements Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Basic statements Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
PZ07B - Basic statements Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Basic statements Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Presentation transcript:

Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery

What is Control Structure.  The control structure is the section of the program that allows your program to make decisions based on the information required by the program.

Control Types  Conditional Logic  Looping Logic  Branching Logic

Conditional Logic  Conditional statement will check the condition first, if it is true then it will execute the section of the program otherwise it will execute the next step of the program based on the information. Syntax: If ( condition) then Execute the statements else Execute the next steps End if.

Use of Select-Case command  Select Case allows you to specify a sequence of code blocks, one of which will be carried out depending on the value of a numerical or string expression.  Shows with example program.

Looping Logic  Do While Loop  Do loop  For Loop Note: Loop Structure – more details in week-4

Branching Logic Control  Two kinds of Branching logic controls: a) Subroutines (Procedures) b) Functions Note: More details with sample program in week-6

Simple Exercise focused on all topics.