Notes week 09

Walter’s Teaching
Pages

VB Programming – Class Notes – Week 9

Homepage ] Office Hours ] Class Listings ] Lab Schedule ] Student Login ] Some interesting links ]


Class notes: Visual Basic

Week: 9

Chapter 6: Repetition

Loop – pg. 250

One of the most important programming structures

During each repetition or "pass" a
statement or statements is executed

Do-While Loop

Repeats as long as a certain condition(s) is/are
true

Follows the form:

Do While condition

statement(s)

Loop

1st checks to see if the condition is
true

2nd executes the set of statements –
only if the condition(s) are true

Often referred to as a "pre" test loop

Example #1, #4

Do Until Loop – pg. 252

Do

Statement(s)

Loop Until condition

Executes the statement(s) first, then checks to see if
it needs to loop again

Often referred to as a "post" test loop

Example #3

Comments Pg. 254

#1,#2,#4

6.2 – Processing List of Data – pg. 262

Counters

Accumulators

Flags

EOF – End Of File

Nested Loops

EOF(n) – determines if the file, referenced by the number n
is at the end or not. Returns true if it is.

Example #1,#2,#3


Copyright ©2001-2002, Walter Wimberly – Instructor and all
’round Cool Guy – IADT