Language Darwin
Date: | 04/20/05 |
Author: | Anonymous |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | (2.00 in 5 votes) |
Some biochemists write code in a programming language called Darwin, which is an interpreted language with support for many of the functions used when analyzing biological sequences. Here is '99 bottles of beer' in Darwin. It even handles plural. plural := proc(num) if num = 1 then return(''): else return('s'): fi: end: bottlesong := proc() for i from 99 to 1 by -1 do printf('%d bottle%s of beer on the wall. \n', i, plural(i)): printf('%d bottle%s of beer\n', i, plural(i)): printf('Take one down, pass it around.\n'): printf('%d bottle%s of beer on the wall.\n\n', i-1, plural(i-1)): od: end: bottlesong();
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