Language Limbo
| Date: | 04/20/05 |
| Author: | Anonymous |
| URL: | n/a |
| Comments: | 1 |
| Info: | n/a |
| Score: |
Limbo is compiler for Lucent Technologies new Inferno Operating System.
implement BeerBottles;
include "sys.m";
sys: Sys;
include "draw.m";
draw: Draw;
BeerBottles: module
{
init: fn(ctxt: ref Draw->Context, agv: list of string);
};
init(ctxt: ref Draw->Context, argv: list of string)
{
sys = load Sys Sys->PATH;
for (int bottles = 99; bottles > 0; bottles--) {
sys->print("%d bottle(s) of beer on the wall,\n",bottles);
sys->print("%d bottle(s) of beer.\n",bottles);
sys->print("Take one down, pass it around,\n");
sys->print("%d bottle(s) of beer on the wall.\n\n");
}
}
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