Language F3
(foreach loop version)
| Date: | 08/29/09 |
| Author: | Bryan Knowles |
| URL: | http://blogs.sun.com/chrisoliver/resource/f3.html |
| Comments: | 0 |
| Info: | http://blogs.sun.com/chrisoliver/resource/f3.html |
| Score: |
package sixpack;
import f3.ui.*;
import java.lang.System;
Frame {
visible: true
title: "99 Bottles of Beer"
width: 720
height: 100
onClose: operation(){
System.exit(0);
}
content:
SimpleLabel {
text: bind [foreach(l in [99..0])
if (l == 0) then
"No bottles of beer on the wall, No bottles of beer.\nTake none down, pass none
around.\nNo bottles of beer on the wall."
else if (l == 1) then
"One bottle of beer on the wall, One bottles of beer.\nTake it down, pass it
around.\nOne bottle of beer on the wall."
else "{l} bottles of beer on the wall, {l} bottles of beer.\nTake one down, pass it
around.\n{l} bottles of beer on the wall."]
[[0..100] dur 5000 linear]
}
}
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments