real language

Bookmarking Digg Diigo DZone Earthlink Google
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Lotus 1-2-3

(single cell version)

Author:Stelio Passaris
Score: (3.00 in 14 votes)
For use within a Lotus 1-2-3 spreadsheet. Copy the formula below into the required cell on an empty
worksheet, and copy down as far as you like. The song lyrics will appear with a line per cell, and
will repeat indefinitely with a blank cell between copies of the song.

American song version, to be entered into cell A4:

@IF(A3="","99 bottles of beer on the wall",@IF(@LEFT(A3,1)="N","",@IF(A2="2 bottles of
beer"#AND#A2<>"","1 bottle of beer on the wall",@IF(A2="1 bottle of beer"#AND#A2<>"","No more
bottles of beer on the
one down and pass it around",@IF(@RIGHT(A3,1)="d",@STRING(@VALUE(@LEFT(A2,@FIND("
",A2,0)))-1,0)&@RIGHT(A1,@LENGTH(A1)-@FIND(" ",A1,0)),@ERR))))))))

British song version, to be entered into cell A3:

@IF(A2="","99 green bottles hanging on the
wall",@IF(@ISERR(@FIND("no",A2,0)),@IF(@LEFT(A2,1)="A","There'll be "&@IF(@LEFT(A1,2)="1
","no"&@REPLACE(@RIGHT(A1,33),13,2,"s h"),@IF(@LEFT(A1,2)="2
if 1 green bottle should accidentally fall")))),""))

Note that the formula should have no line breaks when copied into Lotus 1-2-3.

Download Source | Write Comment

Alternative Versions


>>  Rune Berge said on 09/19/05 15:54:00

Rune Berge Nice one :)
But why is it categorized as esoteric?

>>  Stelio said on 09/20/05 10:01:42

Stelio Thank you. :-D I reckoned it esoteric since this isn't really a programming language.

Note also that anywhere there's a line break in the above code, there is a space in the formula.

>>  Rune Berge said on 09/20/05 17:23:18

Rune Berge In my opinion this should be classified as a scripting language. Hopefully the webmasters will give some opinion on what belongs in which categories.

>>  Stefan Scheler said on 09/21/05 17:01:56

Stefan Scheler As far as categories are concerned, I think we should drop "scripting languages" since it doesn't really fit here. Both esoterial and "real" languages (<- is there a better label for this category) can be scripting languages. We could add beside these categories additional attributes (functional, logic, imperative, oop, scripting?, etc.) where several attributes could be assigned to a language (means lots of work for the existing languages). How about that?

This language here is definitely a real language. Lotus 1-2-3 is well-known spreadsheat application intended to be programmable.

>>  Rune Berge said on 09/21/05 21:44:02

Rune Berge > "real" languages (<- is there a better label for this category)

Conventional might be a better word, though it's not perfect. Lisp wasn't exactly conventional when it was made, but it definately belongs in the "real" category.

Having several attributes might be better but will require more work. We are doing something like that in the Esolang Wiki, but it can be hard sometimes to properly categorize.

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!




Security Code: