Language Alef
Date: | 07/24/05 |
Author: | Christian Klein |
URL: | http://blogs.23.nu/c0re/ |
Comments: | 1 |
Info: | http://www.cs.bell-labs.com/who/rsc/thread/alef.pdf |
Score: | (2.88 in 24 votes) |
adt Shelf { int count; Shelf *s init(int); void decrease (Shelf *s); int left (Shelf *s); void print (Shelf *s); } Shelf * Shelf.init (int cnt) { Shelf *s; alloc s; s->count = cnt; return s; } void Shelf.decrease (Shelf *s) { s->count--; return; } int Shelf.left (Shelf *s) { if s->count > 0 return 1; return 0; } void Shelf.prints (Shelf *s) { if (!s->left(s)) print("no more bottles of beer on the wall"); print("%d one the wall",s->count,"Bottles" ? b->count>1 : "Bottle"); return; } void main (int argc, char **argv) { int i; Shelf *s; s = s.init(99); while (s->left(s)) { prints(s); b.decreass(s); } return; }
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
FOSTERRoslyn said on 05/05/10 03:04:28
I received my first <a href="http://lowest-rate-loans.com/topics/mortgage-loans">mortgage loans</a> when I was 32 and that helped my relatives a lot. Nevertheless, I need the bank loan also.