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: | ![]() |
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
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
But why is it categorized as esoteric?
Note also that anywhere there's a line break in the above code, there is a space in the formula.
This language here is definitely a real language. Lotus 1-2-3 is well-known spreadsheat application intended to be programmable.
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.