Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Lotus 1-2-3

(single cell version)

Date:09/16/05
Author:Stelio Passaris
URL:http://www.stelio.net
Comments:5
Info:n/a
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
wall",@IF(@RIGHT(A3,1)="l"#AND#A3<>A2,A3,@IF(@RIGHT(A3,1)="l",@LEFT(A3,@LENGTH(A3)-12),@IF(@RIGHT(A3,1)="r","Take
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
","1"&@REPLACE(@RIGHT(A1,34),12,2,"e"),@STRING(@VALUE(@LEFT(A1,2))-1,0)&@RIGHT(A1,@LENGTH(A1)-@FIND("
",A1,0)))),@IF(A1="",A2,@IF(@LEFT(A1,1)="T",A2,@IF(@ISERR(@VALUE(@LEFT(A1,2))+@VALUE(@LEFT(A2,2))),@IF(@LEFT(A2,1)="T",@REPLACE(A2,0,12,""),@NA),"And
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

Comments

>>  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!

Name:

eMail:

URL:

Security Code:
  
Comment: