Listing 1. Source code for the program named Alice0175a.

Alice0175a's Code

Created by: Dick Baldwin

world

Events

When the world starts
Do:
world.main ( );

Methods

  public void main ( ) {
    Number index = 100 ; Number limit = 0 ;
       // Copyright 2007, R.G.Baldwin
  // Illustrates a counting loop using a while loop.
  doInOrder {
       // Get input from user and pause for one second.
  limit .set( value , ( NumberDialog( question = Enter an integer between 1 and 5 inclusive. ) ) );
  wait( 1 second );
  }
  // Initialize the index.
  index .set( value , 0 );
  while ( ( index < limit ) ) {
       // Execute the counting loop.
  if ( ( index < 0.5 ) ) {
       p0 .set( isShowing , true );
  } else {
    if ( ( index < 1.5 ) ) {
       p1 .set( isShowing , true );
  } else {
    if ( ( index < 2.5 ) ) {
       p2 .set( isShowing , true );
  } else {
    if ( ( index < 3.5 ) ) {
       p3 .set( isShowing , true );
  } else {
    if ( ( index < 4.5 ) ) {
       p4 .set( isShowing , true );
  } else {
  Do Nothing
  }
  }
  }
  }
  }
  // Update the index.
  index ++
  }
  p0 .say( That's all, Goodbye ); duration = 5 seconds
  }