1 PN$ = "usmdlibs" 2 NA$ = "Brian LeBaron" 3 DA$ = "10/29/2002" 10 ' ===== Variables ===== 11 ' CH = Menu choice 12 ' W$(N) = Array of words for the completed mad-libs 13 ' C$ = Dummy variable to hold screen 14 ' I = Loop counter 40 ' ===== Global ===== 41 DIM W$(13) : ' Makes room in array for the largest Mad-lib 100 ' ===== Main Program ===== 110 CH = 0 115 CLS : ' Go here after invalid choice 120 GOSUB 200 : ' Prints menu, Gets selection 130 GOSUB 300 : ' Goes to appropriate menu choice 140 GOTO 115 : ' Back to menu after GOSUBing 150 END : ' Called by line 310 if CH = 6 199 ' 200 ' ===== Subroutine to Print Menu and Input Menu Choice ===== 201 PRINT "Welcome to U.S. Historical Mad Libs" 202 PRINT "by Brian LeBaron" 203 FOR I = 1 TO 55 : PRINT "-"; : NEXT I : ' Prints row of dashes 204 PRINT:PRINT 205 PRINT "This program will ask you for several nouns," 206 PRINT "verbs, adjectives, adverbs, names, or any other type of" 207 PRINT "word to be placed in certain locations in some historical" 208 PRINT "document. The result is usually a humourous adaptation." 209 PRINT "The more colourful you make your words, the more colourful" 210 PRINT "the new document will be." : PRINT 211 PRINT TAB(10) "Please choose one of the following: " 212 PRINT 213 PRINT TAB(10);"1 - Mad Lib #1: Constitution Pollution" 214 PRINT TAB(10);"2 - Mad Lib #2: Gettysburg Addression Regression" 215 PRINT TAB(10);"3 - Mad Lib #3: Declaration Consternation" 216 PRINT TAB(10);"4 - Mad Lib #4: Amendment Unendment" 217 PRINT TAB(10);"5 - Help on Parts of Speech" 218 PRINT TAB(10);"6 - Exit Program" 219 INPUT "What is the number of the option you would like";CH 220 IF CH < 1 OR CH > 6 THEN PRINT "Invalid choice, try again." : GOTO 115 221 RETURN 299 ' 300 ' ===== Subroutine to go to appropriate menu choice ===== 310 ON CH GOSUB 400,500,600,700,800,150 320 RETURN : ' All above subroutines return here first 400 ' ===== Subroutine for Mad Lib #1 ===== 401 CLS 402 PRINT "-----------Mad Lib #1: Constitution Pollution-----------" 403 PRINT 404 PRINT "Time to enter the eleven words. . ."; 405 INPUT C$ : PRINT 406 PRINT "Enter a(n): " 407 LINE INPUT " 1. Adjective - "; W$(1) 408 LINE INPUT " 2. Noun - "; W$(2) 409 LINE INPUT " 3. Place - "; W$(3) 410 LINE INPUT " 4. Noun - "; W$(4) 411 LINE INPUT " 5. Adjective - "; W$(5) 412 LINE INPUT " 6. Noun - "; W$(6) 413 LINE INPUT " 7. Noun - "; W$(7) 414 LINE INPUT " 8. Verb - "; W$(8) 415 LINE INPUT " 9. Plural Noun - "; W$(9) 416 LINE INPUT "10. Noun - "; W$(10) 417 LINE INPUT "11. Verb - "; W$(11) 418 PRINT 419 PRINT "Here is your completed Mad Lib. . ." 420 PRINT TAB(5);"(Press Enter to continue)";: INPUT C$ 421 PRINT 422 PRINT "We the [" W$(9) "] of the [" W$(3) "], in order to form a" 423 PRINT "more [" W$(1) "] union, establish justice, insure [" W$(5) "]" 424 PRINT "tranquility, provide for the common [" W$(2) "], promote" 425 PRINT "the general [" W$(7) "], and [" W$(8) "] the blessings of [" W$(10) "]" 426 PRINT "to ourselves and our [" W$(6) "], do [" W$(11) "] and establish" 427 PRINT "this [" W$(4) "] for the [" W$(3) "]." 428 PRINT 429 PRINT TAB(5);"Press enter to return to the main menu. . ."; : INPUT C$ 430 RETURN 499 ' 500 ' ===== Subroutine for Mad Lib #2 ===== 501 CLS 502 PRINT "--------Mad Lib #2: Gettysburg Addression Regression--------" 503 PRINT 504 PRINT "Time to enter the eight words. . ."; 505 INPUT C$ : PRINT 506 PRINT "Enter a(n): " 507 LINE INPUT " 1. Plural Noun - "; W$(1) 508 LINE INPUT " 2. Past Tense Verb - "; W$(2) 509 LINE INPUT " 3. Noun - "; W$(3) 510 LINE INPUT " 4. Adjective - "; W$(4) 511 LINE INPUT " 5. Noun - "; W$(5) 512 LINE INPUT " 6. Noun - "; W$(6) 513 LINE INPUT " 7. Past Tense Verb - "; W$(7) 514 LINE INPUT " 8. Plural Noun - "; W$(8) 515 PRINT : PRINT "Here is your completed Mad Lib. . ." 516 PRINT TAB(5);"(Press Enter to continue)";: INPUT C$ 517 PRINT 518 PRINT "Fourscore and seven [" W$(8) "] ago our fathers [" W$(7) "]" 519 PRINT "forth on this [" W$(3) "], a new [" W$(6) "], conceived in" 520 PRINT "[" W$(5) "], and [" W$(2) "] to the proposition that all" 521 PRINT "[" W$(1) "] are created [" W$(4) "]." 522 PRINT TAB(5);"Press Enter to return to the main menu. . .";: INPUT C$ 523 RETURN 599 ' 600 ' ===== Subroutine for Mad Lib #3 ===== 601 CLS 602 PRINT "-------------Mad Lib #3: Declaration Consternation-------------" 603 PRINT 604 PRINT "Time to enter the thirteen words. . ."; 605 INPUT C$ : PRINT 606 PRINT "Enter a(n): " 607 LINE INPUT " 1. Plural Noun - "; W$(1) 608 LINE INPUT " 2. Adjective - "; W$(2) 609 LINE INPUT " 3. Verb - "; W$(3) 610 LINE INPUT " 4. Adjective - "; W$(4) 611 LINE INPUT " 5. Past Tense Verb - "; W$(5) 612 LINE INPUT " 6. Verb - "; W$(6) 613 LINE INPUT " 7. Plural Noun - "; W$(7) 614 LINE INPUT " 8. Adjective - "; W$(8) 615 LINE INPUT " 9. Plural Noun - "; W$(9) 616 LINE INPUT "10. Adjective - "; W$(10) 617 LINE INPUT "11. Person or Group of People - "; W$(11) 618 LINE INPUT "12. Verb - "; W$(12) 619 LINE INPUT "13. Noun - "; W$(13) 620 PRINT 621 PRINT "Here is your completed Mad Lib. . ." 622 PRINT TAB(5);"(Press Enter to continue)";: INPUT C$ 623 PRINT 624 PRINT "When in the Course of human [" W$(7) "], it becomes" 625 PRINT "[" W$(2) "] for one people to [" W$(3) "] the [" W$(4) "]" 626 PRINT "bands which have [" W$(5) "] them with another, and" 627 PRINT "to [" W$(6) "] among the [" W$(1) "] of the earth, the" 628 PRINT "separate and [" W$(8) "] station to which the [" W$(9) "] of" 629 PRINT "Nature and of Nature's God entitle them, a [" W$(10) "]" 630 PRINT "respect to the opinions of [" W$(11) "] requires that" 631 PRINT "they should [" W$(12) "] the causes which impel them to" 632 PRINT "the [" W$(13) "]." 633 PRINT 634 PRINT TAB(5);"Press enter to return to the main menu. . ."; : INPUT C$ 635 RETURN 699 ' 700 ' ===== Subroutine for Mad Lib #4 ===== 701 CLS 702 PRINT "-----------Mad Lib #4: Amendment Unendment-----------" 703 PRINT 704 PRINT "Time to enter the eleven words. . ."; 705 INPUT C$ : PRINT 706 PRINT "Enter a(n): " 707 LINE INPUT " 1. Adjective - "; W$(1) 708 LINE INPUT " 2. Noun - "; W$(2) 709 LINE INPUT " 3. Unit of Currency - "; W$(3) 710 LINE INPUT " 4. Noun - "; W$(4) 711 LINE INPUT " 5. Adjective - "; W$(5) 712 LINE INPUT " 6. Noun - "; W$(6) 713 LINE INPUT " 7. Past Tense Verb - "; W$(7) 714 LINE INPUT " 8. Adverb - "; W$(8) 715 LINE INPUT " 9. Noun - "; W$(9) 716 LINE INPUT "10. Place - "; W$(10) 717 LINE INPUT "11. Plural Noun - "; W$(11) 718 PRINT 719 PRINT "Here is your completed Mad Lib. . ." 720 PRINT TAB(5);"(Press Enter to continue)";: INPUT C$ 721 PRINT 722 PRINT "In suits at [" W$(1) "] law, where the [" W$(2) "] in controversy" 723 PRINT "shall exceed twenty [" W$(3) "], the right of [" W$(6) "] by jury" 724 PRINT "shall be [" W$(7) "], and no [" W$(9) "] tried by a jury shall be" 725 PRINT "[" W$(8) "] reexamined in any [" W$(4) "] of the [" W$(10) "]," 726 PRINT "than according to the [" W$(11) "] of the [" W$(5) "] law." 727 PRINT 728 PRINT TAB(5);"Press enter to return to the main menu. . ."; : INPUT C$ 729 RETURN 799 ' 800 ' ===== Subroutine for Help on Parts of Speech ===== 801 CLS 802 PRINT "Short Glossary of Parts of Speech" 803 FOR I=1 TO 55 : PRINT "-";: NEXT I : 'Row of Dashes 804 PRINT TAB(5); "Noun - A person, place or thing" 805 PRINT TAB(10); "Examples: mailman, tennis court, tree" 806 PRINT TAB(5); "Proper Noun - A specific noun or the name of something" 807 PRINT TAB(10); "Examples: Bob, Jill, Big Ben" 808 PRINT TAB(5); "Verb - an action word, what something is doing" 809 PRINT TAB(10); "Examples: run, jump, emancipate" 810 PRINT TAB(5); "Adjective - A word that describes a noun" 811 PRINT TAB(10); "Examples: red, cool, effervescent" 812 PRINT TAB(5); "Adverb - A word that describes a verb (Usually ends in -ly)" 813 PRINT TAB(10); "Examples: joyfully, courageously, voraciously" 814 PRINT TAB(5); "Plural - a noun that includes more than one (Usually just add s)" 815 PRINT TAB(10); "Examples: geese, sheep, deer, spaghetti, Nachschlagen" 816 PRINT TAB(5); "Tense - the form of a verb that tells when something will happen" 817 PRINT TAB(5); "(Past, Present, Future)" 818 PRINT TAB(10); "Examples: galloped (past), gallops (present), will gallop (future)" 819 PRINT 820 PRINT TAB(5); "Just use present tense verbs and singular nouns. That is," 821 PRINT TAB(5); "if you want your new historical document to have correct grammar." 823 PRINT 824 PRINT TAB(5);"Press enter to return to the main menu. . ."; : INPUT C$ 825 RETURN 899 '