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 QBasic

Date:04/20/05
Author:Jeff Connelly
URL:n/a
Comments:3
Info:n/a
Score: (2.82 in 34 votes)
' "99 Bottles of Beer on the Wall" QBasic / Perl Polyglot            '.
' Copyright (C) 2000 Jeff Connelly <polyglotqbperl@xyzzy.cjb.net>    '.
' May be freely distributed                                          '.
'                                                                    '.

' Probably only works in DOS.  You can get QBasic 1.1 with DOS, or   '.
' on the World Wide Web at http://www.neozones.com/ .                '.
' Note that QBasic reformats source code as it is opened; so do not  '.
' save this file inside QBasic if you want it to be parsed by Perl.  ';

'';sub function{}sub st{}
function st$(x1, y!, m$)
st$ = ltrim$(str$(y!))
end function
'!;

m%=99'%;$STATIC=9x2;
do
'NUL'; do {
    print st$(x1,m%-0%,z.$); '',print"\cH"x3;print
    '',$STATIC;
    print " bottles of beer on the wall";
    print ''; print "\n"x2; <<;
    print


    print st$(x1,m%-0%,z.$); '',print"\cH"x3;print
    '',$STATIC; 
    print " bottles of beer on the wall,";
    print ''; print "\n";

    print st$(x1,m%-0%,z.$); '',print"\cH"x3;print
    '',$STATIC;
    print " bottles of beer,";
    print '' and print "\n";


    print "Take one down, pass it around,";
    print ""; ''; print "\n";
    ''; <<;
    print


    ''; --$STATIC;
    m%=m%-1+foo.


''}  until $STATIC == 0 or !<<;;
loop until m%=0'%-1

system

Download Source | Write Comment

Alternative Versions

Comments

>>  Anthony Williams said on 04/01/06 11:35:17

Anthony Williams Um, why did someone post such a large (and unrelated) QB source here? :-P

>>  Pulseczar said on 07/29/06 08:53:21

Pulseczar anonymity + audience

>>  Russell said on 09/10/07 03:15:22

Russell The comment by datavirus627 should be deleted!!!

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: