public void main ( ) {
Number limit = 0 ; |
|
// Copyright 2007, R.G.Baldwin |
// Illustrates a counting loop using a for loop. |
// Same behavior as Alice0175a but simpler. |
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 ); |
} |
for (int index=0; index< limit times ; index++) { |
|
if ( ( index == 0 ) ) { |
|
p0 .set( isShowing , true ); |
} else { |
|
if ( ( index == 1 ) ) { |
|
p1 .set( isShowing , true ); |
} else { |
|
if ( ( index == 2 ) ) { |
|
p2 .set( isShowing , true ); |
} else { |
|
if ( ( index == 3 ) ) { |
|
p3 .set( isShowing , true ); |
} else { |
|
if ( ( index == 4 ) ) { |
|
p4 .set( isShowing , true ); |
} else { |
|
Do Nothing |
} |
} |
} |
} |
} |
} |
p0 .say( That's all, Goodbye ); duration = 5 seconds |
} |