public void main ( ) {
Number limit = 0 ; Object[] penguins = ; |
|
// Copyright 2007, R.G.Baldwin |
// Illustrates a counting loop using a for loop. |
// Similar to A0175d only simpler. |
// Used an array of objects to store penguins. |
doInOrder { |
|
// Get input from user and pause for one second. |
limit .set( value , ( NumberDialog( question = Enter an integer between 1 and 5 inclusive. ) ) ); |
// Clamp limit at maximum of 5. |
if ( ( limit > 5 ) ) { |
|
limit .set( value , 5 ); |
} else { |
|
Do Nothing |
} |
wait( 1 second ); |
} |
for (int index = 0 ; index< limit times ; index += 1 ){ |
|
( penguins [ index ] ) .set( opacity , 1 (100%) ); duration = 1 second |
} |
p0 .say( That's all, Goodbye ); duration = 5 seconds |
} |