Control Structures in VB

Slides:



Advertisements
Similar presentations
2008 Pearson Education, Inc. All rights reserved Control Statements: Part 1.
Advertisements

Project on VB Control Structures
1 Statements. 2 Statements - 강의순서 ▣ 병행 (Concurrent) Statement ◈ Concurrent Signal Assignment, Simple ◈ Concurrent Signal Assignment, Conditional ◈ Concurrent.
Pemrograman VisualMinggu …4… Page 1 MINGGU Ke Empat Pemrograman Visual Pokok Bahasan: Control Statement I Tujuan Instruksional Khusus: Mahasiswa dapat.
Selection (decision) control structure Learning objective
IS437: Fall 2004 Instructor: Dr. Boris Jukic Program Flow Control: Decisions and Conditions (Branching) Controlled Repetition (Looping)
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 2 Microcomputer Systems Design (Embedded Systems)
Chapter 8 (Control Structure) Slide 1 Control Structures Control structures are used by the programmer to incorporate the desired sequence of execution.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic JavaScript: Control Structure.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
General Computer Science for Engineers CISC 106 Lecture 05 Dr. John Cavazos Computer and Information Sciences 2/20/2009.
Structured Program Development in C
Examples from “c++ how to program” book. SELECTIONS WITH IF-ELSE Example: if ( grade >= 60) cout = 60) cout
CSCI 3327 Visual Basic Chapter 4: Control Statements in Visual Basic (Part 1A) UTPA – Fall 2011.
 2003 Prentice Hall, Inc. All rights reserved.  2004 Prentice Hall, Inc. All rights reserved. Chapter 8 - JavaScript: Control Statements I Outline 8.1.
VB Arrays Chapter 8 Dr. John P. Abraham Professor UTPA.
Programming in Java Unit 4. Learning outcome:  LO2: Be able to design Java solutions  LO3: Be able to implement Java solutions Assessment criteria:
 2002 Prentice Hall. All rights reserved. 1 Chapter 4: Control Structures: Part 1 Outline 4.1 Introduction 4.2 Algorithms 4.3 Pseudocode 4.4 Control Structures.
3 C# Control Statements Dr. John P. Abraham Professor UTPA.
Chapter 71 Repetition - Do Loops n A Loops, is used to repeat a sequence of statements a number of time n There are two loops commands in Visual Basic.
ㅎㅎ logical operator if if else switch while do while for Third step for Learning C++ Programming Repetition Control Structures.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Object Oriented Programming Lecture 4: Flow Control Mustafa Emre İlal
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 5: Introduction to C: More Control Flow.
Chapter 3 - Structured Program Development Outline 3.1Introduction 3.2Algorithms 3.3Pseudocode 3.4Control Structures 3.5The If Selection Structure 3.6The.
1 Chap 4. Data Should know Declare & Initialize variables Declare constants Assignment Operators Increment and Decrement Operators Precedence of Operators.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 8 - JavaScript: Control Statements I Outline 8.1 Introduction 8.2 Algorithms 8.3 Pseudocode 8.4.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
Control Statements in C 1.Decision making statements 2.Looping statements 3.Branching statements
Lecture 4: C/C++ Control Structures Computer Programming Control Structures Lecture No. 4.
Structured Program Development Angela Chih-Wei Tang ( 唐 之 瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan 2010.
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX.
Chapter 15 JavaScript: Part III The Web Warrior Guide to Web Design Technologies.
Dr. Qusai Abuein1 Internet & WWW How to program Chap.(7) JavaScript: Control Statements I.
Lab 6 (1) Range Review, Control Logic and Loops ► Control Logic and Loops ► Exercise.
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.
1 Chapter 4 - Control Statements: Part 1 Outline 4.1 Introduction 4.4 Control Structures 4.5 if Selection Structure 4.6 if/else Selection Structure 4.7.
Chapter 3: Decisions and Loops
Visual Basic 6 (VB6) Data Types, And Operators
Unit-1 Introduction to Java
Think What will be the output?
Chapter 8 - JavaScript: Control Statements I
Ch 7: JavaScript Control Statements I.
Lecturer CS & IT Department UOS MBDIN
Chapter 4 – Control Structures Part 1
Chapter 5 Repetition.
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
Control Structures: Part 1
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I UTPA – Fall 2012 This set of slides is revised from lecture slides.
Alice in Action with Java
JavaScript: Functions Part II
Introduction to Programming
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I – Exercises UTPA – Fall 2012 This set of slides is revised from lecture.
MSIS 655 Advanced Business Applications Programming
The University of Texas – Pan American
CSCI 3328 Object Oriented Programming in C# Chapter 5: C# Control Statement – Part II – Exercises UTPA – Fall 2012 This set of slides is revised from.
3 Control Statements:.
Introduction to Problem Solving and Control Statements
CSCI 3327 Visual Basic Review: Exam I
Three Special Structures – Case, Do While, and Do Until
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
ICT Programming Lesson 3:
Control Structures in VB
The structure of programming
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
The structure of programming
Repetition (While Loop) LAB 9
Thinking procedurally
Flow of Control Flow of control is the order in which a program performs actions. Up to this point, the order has been sequential. A branching statement.
REPETITION Why Repetition?
Presentation transcript:

Control Structures in VB Dr. John Abraham Professor, UTPA

Sequential vs Selection Program Counter Transfer of control Goto unstructured Structured: sequence, selection and repetiton

Selection If..then If grade >= 60 then write(“Passed”) else write (“Failed”) End If

Nested selection If grade >= 90 then write(“A”) Else write(“B”) if grade >= 70 then write(“C”) write(“F”) End If

Alternative version If grade >=90 then write (“A”) ElseIf grade >=80 then write(“B”) ElseIf grade >= 70 then write(“C”) Else write(“D”) End If

Select Case Select Case Grade Case 100 statements Case 90 to 99 Case Else End Select

Repetition chapters 5 & 6 While – End While Do While – Loop Do Until – Loop For – Next Do – Loop While Do – Loop Until See example programs

While – End While Select a loop control variable (example grade) Initialize that variable (either read or assign) Set up loop like this While grade <= 100 Grade = console.readline() End while

Assignment3 Explained