Make your own free website on

Chapter 8


Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

Chapter 10

Chapter 11

Chapter 12

Chapter 13

Chapter 14

Chapter 15

Table of Contents

Arrays and Chaos

A menu command that is checked shows a check mark at the beginning of the item. A menu item that is enabled can be clicked to generate a Click event. A menu command whose Enabled property is set to False is dimmed and does not generate a Click event when clicked.

Giving two or more menu items the same name creates a menu control array in which all items execute the same event procedures. The items are differentiated within the procedure by the value of the index parameter sent to the procedure.

The Print method is used for displaying text and values directly on a form.

The Select Case statement replaces a series of If-Then statements. Its syntax is:

    Select Case expression
      Case value1
        statements if value1 = expression
      Case value2
        statements if value2 = expression
      Case Else
        statements executed if the expression doesn't match any of the Values
    End Select

An array is a list of values in memory. Arrays have a single variable name that refers to the entire list. A subscript is a whole number that selects a single item from the list.

A non-linear difference equation of the form:

    p2 = r * p1 * (1-p1)

is used as a simple mathematical model for many systems. p1 is the initial state, p2 is the final state, and r is the growth factor.