Language QBasic
| Date: | 04/20/05 |
| Author: | Jeff Connelly |
| URL: | n/a |
| Comments: | 3 |
| Info: | n/a |
| Score: |
' "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
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