web=offline player=vlc browser=firefox cls print "This is a test file for BASIC English" print "You can rename it to whatever you want, as long as it's a text file" print list files print list files /home/retrojunkie/temp print list files /home/nonsense print "Testing the open file command" print open file test2.txt print print "Testing the create file command" print create file test3.txt print print "Testing the print to option" print to test3.txt, "File opened on "; date print to test3.txt, date; print to test3.txt, ", "; time print to test3.txt, time; print to test3.txt, "." print to test3.txt print to test3.txt, "This is a test of the function to print to a file." print to test3.txt, "It's quite primitive, but I think it works." print to test3.txt, "Here's a really long string to see if I need to clear the variables when I'm done with them." print to test3.txt, "Short one." print to test3.txt, "Here's a normal sized string, because why not?" print print "Testing the save command" save test3.txt print to test3.txt, "I should be able to add this to the end after the save." print print "Testing the view command" view /home/retrojunkie/slapstik/celebpic/aaliyahh/ah001.jpg with firefox print print "view works with the web=offline option" print view retrojunkie.com with firefox view www.retrojunkie.com with firefox view http://www.retrojunkie.com with firefox print print "Testing the edit command" print edit test2.txt with gedit print print "The next line is 'rem play /media/E65CA3355CA30003/Music/e.mp4' and is ignored " print "because the interpreter doesn't recognize rem as a command" print print "That will probably always work, but anything the interpreter doesn't recognize" print "is ignored and can be used as a comment" print rem print "Testing the play command" rem play /media/E65CA3355CA30003/Music/e.mp4 print print "Testing the browse command" browse /media/E65CA3355CA30003/Music/e.mp4 print print "Testing the error messages for the print tab(xx) command" print print tab(foobar), "This error should be trapped (it was)" print tab (1o), "This error should be trapped (it was)" print print tab(20), "Testing the tab option" print print "This is a test of the "; print "semicolon." print print tab(10), "Testing the tab "; print "semicolon." print print "Another browse test, using the browser= option" browse /home/retrojunkie/slapstik/celebpic/aaliyahh/ah001.jpg rem browse /media/E65CA3355CA30003/Music/e.mp4 print print "Testing the browse command with web=offline" print browse http://www.wikipedia.com browse www.wikipedia.com browse wikipedia.com print print "Testing the browse command using the with option" browse /home/retrojunkie/slapstik/celebpic/aaliyahh/ah001.jpg with firefox print print "Testing the copy command" print copy "/home/retrojunkie/slapstik/celebpic/aaliyahh/ah001.jpg" to "/home/retrojunkie/slapstik/programm/yai/test/ah001.jpg" copy "/media/E65CA3355CA30003/Music/e.mp4" to "/home/retrojunkie/slapstik/programm/yai/test/e.mp4" copy "yai.c" to "/home/retrojunkie/slapstik/programm/yai/test/yai2.txt" print list files /home/retrojunkie/slapstik/programm/yai/test print print "Testing the idle command" idle 10 print print "Testing the error handling for the idle command" print idle 1o print print "Testing the delete command" print delete test/yai2.txt print print "Testing the open window command" print open window print print "Testing the find command" print find "qxvc" in "This is a test" find "test" in "This is a test" print "Testing the print time and print date commands" print date print "Today's date is "; print date; print ", and the time is currently "; time print time; print "." print rem An alternative to "folder in "create folder" is "directory" rem print "Testing the create directory command" rem print rem create directory temp print "Testing the create folder command" print create folder test print print "Testing the close command" print close test3.txt print "Testing the rename command" print rename "f2" to "f1" print print "Testing the move command" print move "f1" to "../working/f1" move "../working/f.mp4" to "/media/WD/f.mp4" rem move "../working/f.mp4" to "/media/E65CA3355CA30003/f.mp4" rem I'm going to comment out the at test, because I'm sure it works and because it interferes with other stuff if the time isn't correct rem print rem print "Testing the at keyword" rem print rem at 5:38 PM view /home/retrojunkie/slapstik/programm/working/e.mp4 with firefox print print "Testing the empty command" empty test print list files test print print "Testing the private code maker (password generator)" print make private code print print "Testing the assign command (a=3) and printing the result" assign 3 to a print print a print print "Testing the add command (and printing the result)" print print "Adding a constant to a variable (2+a)" add 2 to a print print sum print print "Adding two constants (2+13)" add 2 to 13 print sum print print "Assigning a value to a variable and adding it to another variable (gedit=7, gedit+a)" assign 7 to gedit add gedit to a print print sum print print "Assigning a value to a variable and adding it to a constant (vlc=9, vlc+2)" assign 9 to vlc add vlc to 2 print print sum print print "Attempting to print the value of an uninitialized variable (not yet assigned)" print print q print print "Attempting to assign the value of a variable (a) to a variable (q)" assign a to q print print q print print "Testing the make new variable command (and printing its value)" make new variable thelonious print thelonious print print print "Testing the if statement" print print "First, we assign the value 3 to a, with the command" print print "assign 3 to a" assign 3 to a print print "The sum is either from a prior addition or is zero, depending:" print print sum print print "Next, we check for equality, with the statement" print print "if a equals 3 add 2 to a" rem if a equals 3 jump to add2 if a equals 3 add 2 to a print rem jump to printsum print "Now, the sum is "; print sum print print "Assigning the sum to a" assign sum to a print print "a is now "; print a print print "Testing the and operator in an if statement" print print "Starting out, a="; print a print print "Now, assign 12 to the variable gedit" assign 12 to gedit print print "The if statement reads 'if a equals 5 and gedit equals 12 add 2 to a'" if a equals 5 and gedit equals 12 add 2 to a print print "If all went well, the sum should now be 7" print print "The sum is now "; print sum print print "Testing the or operator in an if statement" print print "The if statement reads 'if a equals 5 or gedit equals 11 add 3 to a'" if a equals 5 or gedit equals 12 add 3 to a print print "If all went well, the sum should now be 8" print print "The sum is now "; print sum print print "Attempting to assign to string variables and print the result" print assign "Now is the time for all good men to come to the aid of their party." to a$ print a$ print print "Attempting to assign a string variable to another string variable" print assign a$ to b$ print b$ print print "Testing the jump command, an attempt at subroutines:" print print "Here we are in the main program." print jump to subrouti print "And here we are back in the main program again." print print "Testing the 'count' loop:" print count from 1 to 3 and assign count to a print a next print print "Testing the subtract command" print print "a should be 3" print print "a="; print a print "Now we'll subtract 2 from a and print the result" print subtract 2 from a print difference print print "Now we try to assign the difference to the variable b and print it" assign difference to b print print b print print "Testing the count loop again, this time counting backward" print count from 3 to 1 and assign count to b print b previous print print "Testing the random number generator" print choose a random number from 1 to 10 assign choice to b print b print print "Testing subtracting a constant from a constant (subtract 2 from 13)" print subtract 2 from 13 print difference print print "Testing subtracting a variable from a variable (gedit=7, a=3, subtract gedit from a)" print assign 7 to gedit subtract gedit from a print difference print print "Testing subtracting a variable from a constant (vlc=9, subtract vlc from 2)" print assign 9 to vlc subtract vlc from 2 print difference print print "Testing multiplication:" print print "Multiply a constant by a variable (a=3, multiply 2 by a)" print assign 3 to a multiply 2 by a print product print print "Assign the product to a variable (b)" print assign product to b print b print print "Multiply a constant by a constant (multiply 2 by 13)" print multiply 2 by 13 print product print print "Multiply a variable by a variable (gedit=7, multiply gedit by a)" print assign 7 to gedit multiply gedit by a print product print print "Multiply a variable by a constant (vlc=9, multiply vlc by 2)" print assign 9 to vlc multiply vlc by 2 print product print print "Testing Division:" print print "Divide a constant by a variable (a=3, divide 2 by a)" print assign 3 to a divide 2 by a print quotient print print "Assign the quotient to a variable (b)" print assign quotient to b print b print print "Divide a constant by a constant (divide 2 by 13)" print divide 2 by 13 print quotient print print "Divide a variable by a variable (gedit=7, divide gedit by a)" print assign 7 to gedit divide gedit by a print quotient print print "Divide a variable by a constant (vlc=9, divide vlc by 2)" print assign 9 to vlc divide vlc by 2 print quotient print print "Now we want to try reading a line from the file we opened earlier" print read line from test2.txt print "Let's print the line, just for kicks" print print line print print "And now we'll close the file" close test2.txt print center "Testing the center command" print print "Testing string variables with if statements" print assign "testing and testing" to test$ print test$ assign test$ to a$ print a$ if a$ equals "testing and testing" print "Variables match." print print "Testing string variables with if statement and the and operator" print assign "Test" to infinity$ assign "Another test" to ctest$ print infinity$ print ctest$ if infinity$ equals "Test" and ctest$ equals "Another test" print "And condition satisfied." print print "Testing the do loop" print assign 0 to a do add 1 to a assign sum to a print a until a equals 3 print print "Testing string variables with if statement and the or operator" print if infinity$ equals "Something" or ctest$ equals "Another test" print "Or condition satisfied." print print "Testing variable to variable comparisons in if statements" assign a to q print if a equals q print "Variables a and q match." print print "Testing mixed variables in an and statement, string first" print if infinity$ equals "Test" and a equals 3 print "Mixes match :)" print print "Now numeric first" print if gedit equals 7 and infinity$ equals "Test" print "Mixes still match" print if gedit equals 7 or infinity$ equals "Test" print "Mixes are matching with or" if infinity$ equals "Test" or gedit equals 7 print "Mixes are still matching with or" if infinity$ equals "true" or gedit equals 12 print "Something has gone awry" if infinity$ equals "Test" and gedit equals 7 print "Now is the time for all good men to give me $1.00" if a equals 3 and gedit equals 7 print "Here's $5.00" if a equals 3 or gedit equals 12 print "What were they thinking with the $2.00 bill?" assign infinity$ to finity$ print infinity$ print finity$ if infinity$ equals finity$ print "This seems to work." if a equals 3 print "Will this work or won't it?" if infinity$ equals finity$ print "This will either work or not." if infinity$ equals finity$ and a equals 3 print "This worked." if infinity$ equals finity$ and a equals q print "This worked too." assign "test2" to infinity$ assign infinity$ to finity$ if infinity$ equals finity$ and a$ equals test$ print "Still working." if a equals q and infinity$ equals finity$ print "I think we're done with the and operator." if infinity$ equals finity$ or a equals gedit print "Or works." if a equals q or infinity$ equals ctest$ print "Or still works." if infinity$ equals finity$ or a equals gedit print "Or is continuing to work." if a equals gedit or infinity$ equals finity$ print "Or is still working." if infinity$ equals finity$ or a equals 7 print "I'm running out of ideas for the Or operator." if a equals 7 or infinity$ equals finity$ print "I think I'm done with the Or operator for now." if a is not equal to 7 print "Here's a primitive inequality." if a$ is not equal to "Florida" print "Here's another." if a is not equal to gedit print "Yet Another." if infinity$ is not equal to ctest$ print "Still another." if a is not equal to 4 and gedit is not equal to 12 print "Numeric constants with and seem to work." if a$ is not equal to "Florida" and infinity$ is not equal to "media" print "String constants seem to work as well." if a is not equal to gedit and gedit is not equal to q print "Numeric variables with and appear to be working." if a$ is not equal to infinity$ and infinity$ is not equal to ctest$ print "String variables too." if infinity$ is not equal to a$ and a is not equal to 4 print "Mixing variable types worked with inequality." if a is not equal to 7 and infinity$ is not equal to a$ print "Seems to work the other direction too." if a is not equal to gedit and infinity$ is not equal to a$ print "Inequality statements, and operator, mixed, no constants." if infinity$ is not equal to ctest$ and q is not equal to gedit print "Same as above, other direction." if infinity$ is not equal to a$ or a is not equal to q print "Simple or statement, working with inequality." if infinity$ is not equal to a$ or a is not equal to 3 print "Another." if a is not equal to q or infinity$ is not equal to a$ print "And another." if a is not equal to gedit or infinity$ is not equal to finity$ print "Yet another." if infinity$ is not equal to "test2" or a is not equal to 7 print "Getting there." if a is not equal to q or infinity$ is not equal to "Canterbury" print "Closer to there." if infinity$ is not equal to finity$ or a is not equal to 7 print "Almost done." assign "Theory" to player$ assign "Bambi" to recommended$ if player$ is not equal to "Theory and Reality" print "I may have found a bug to fix." if player$ is not equal to "Theory and Reality" and recommended$ is not equal to "Bambi and Godzilla" print "I think I found a bug to fix." if a is not equal to 7 or infinity$ is not equal to finity$ print "Done." if a equals 3 and player$ is not equal to "Theory and Reality" print "I'm pretty sure mixing states needs more work." if a equals q and player$ is not equal to a$ print "Let's see if mixing states with variables will work." if player$ equals "Theory" and a is not equal to 4 print "Still mixing states as expected." if a$ equals test$ and a is not equal to gedit print "Expectations confirmed." if a is not equal to 4 and player$ equals "Theory" print "So far so good." if player$ is not equal to "Test" and a$ equals test$ print "Not bad." if a is not equal to gedit and infinity$ equals finity$ print "Twisting and Testing." if player$ is not equal to a$ and a equals 3 print "Do the twist." assign 7 to updates assign updates to available if updates equals 7 or player$ is not equal to "Theory" print "Now we try mixing states with Or." if updates equals available or player$ is not equal to "This value shouldn't matter" print "This should work." if player$ equals "Theory" or a is not equal to 4 print "This should work as well." if a$ equals test$ or a is not equal to gedit print "No reason this shouldn't work." assign 10 to mb if mb equals 3 or player$ is not equal to "Fri" print "Or statement, mixed states, first half is false." if mb equals a or player$ is not equal to recommended$ print "As above, all variables, no constants." if player$ equals "Bambi" or b is not equal to 3 print "As above, string constants first." if player$ equals a$ or mb is not equal to q print "As above, string variables first." assign 9 to sat if sat is not equal to 3 or player$ equals "Jul" print "Inequality first, constants, first half is true." if sat is not equal to a or player$ equals recommended$ print "As above, variables." if player$ is not equal to "Bambi" or sat equals 3 print "As above, string constants first." if player$ is not equal to a$ or mb equals 10 print "As above, string variables first." if sat is not equal to 9 or player$ equals "Theory" print "Constants, first half is false." assign sat to pm if sat is not equal to pm or a$ equals test$ print "Numeric variables first." if a$ is not equal to test$ or sat equals pm print "String variables first." if a$ is not equal to test$ or sat equals 9 print "Mixing variables and constants." if sat is greater than a print "Simple example of the greater than operator." if sat is greater than 3 print "Greater than with constants." if player$ is greater than recommended$ print "Theory is greater than Bambi." if player$ is greater than "Bambi" print "Theory is still greater than Bambi." assign 12 to tue if sat is greater than a and tue is greater than sat print "And statements should be working with Greater Than." if sat is greater than a and test$ equals a$ print "Mixing states, greater than and equals." if a is greater than 2 and player$ is not equal to test$ print "Mixing states, greater than and not equal." if a$ is greater than player$ and tue is greater than a print "Greater Than, and statement, string variables first." if sat is greater than a or sat is greater than tue print "Or statements should be working with Greater Than." if a is greater than sat or tue is greater than sat print "Or statement, numeric variables, first half false." if sat is greater than a or test$ equals infinity$ print "Mixing states, greater than and equals." if a is greater than 2 or finity$ is not equal to infinity$ print "Mixing states, greater than and not equal to." if a$ is greater than player$ or a is greater than tue print "Greater Than, or statement, string variables first." if a is less than sat print "Simple example of the less than operator." if a is less than sat and sat is less than tue print "Simple and statement with less than." if a is less than 4 and player$ is not equal to test$ print "Mixing states, less than and not equal." if a is less than sat and test$ equals a$ print "Less Than, mixed states, less than and equals." if player$ is less than a$ and a is less than tue print "Less than, and statement, string variables first." if a is less than sat or tue is less than sat print "Simple or statement with less than." if sat is less than a or sat is less than tue print "Or statement, less than, first half false." if sat is less than a or test$ equals a$ print "Mixing states, less than and equals." if a is less than 2 or test$ is not equal to infinity$ print "Mixing states, less than and not equal." if a$ is less than player$ or a is less than tue print "Less Than, or statement, string variables first." print if a is less than 4 do: add 4 to 5 print sum assign "Block If Test" to retrojunkie$ print retrojunkie$ print tab(20), "Block If Test" center "Block If Test" done print "Here's a test line" print print "Testing the find command" print assign string to te print te starting at te assign "This is a test" to b$ print b$ find "example" in "Another example" assign string to t2 print t2 starting at t2 assign "Another example" to c$ print c$ find "Test" in "Testing" assign string to t0 starting at t0 to 4 assign "Testing" to d$ print d$ assign "This is another test" to a$ find "test" in a$ assign string to t3 starting at t3 assign a$ to f$ print f$ assign "Mares eat oats" to g$ find "eat " in g$ assign string to t4 starting at t4 to 3 assign g$ to h$ print h$ assign "Mares eat oats" to i$ find "eat " in i$ assign string to t5 starting at t5 assign i$ to j$ print j$ assign "VLC Media Player" to pl$ find "VLC" in pl$ assign string to v0 assign 3 to nu starting at v0 to nu assign pl$ to p2$ print p2$ assign "anything goes" to m1$ assign "anything goes" to m2$ assign "anything goes" to m3$ print m1$ print m2$ print m3$ print print "Testing the text attributes:" print print "Normal Text" bold on print "Bold Text" bold off print "Back to normal text" color gray print "Gray Text" color black print "Black Text" color dark gray print "Dark Gray Text" color bold black print "Bold Black Text" color red print "Red Text" color dark red print "Dark Red Text" color rust print "Rust Text (Same as Dark Red)" color brown print "Brown Text (Same as Dark Red)" color bold red print "Bold Red Text" color green print "Green Text" color dark green print "Dark Green Text" color bold green print "Bold Green Text" color yellow print "Yellow Text" color dark yellow print "Dark Yellow Text" color olive print "Olive Text (Same as Dark Yellow)" color bold yellow print "Bold Yellow Text" color blue print "Blue Text" color dark blue print "Dark Blue Text" color bold blue print "Bold Blue Text" color magenta print "Magenta Text" color bright magenta print "Bright Magenta Text" color bold magenta print "Bold Magenta Text" color purple print "Purple Text (Same as Magenta)" color bright purple print "Bright Purple Text (Same as Bright Magenta)" color bold purple print "Bold Purple Text (Same as Bold Magenta)" color cyan print "Cyan Text" color dark cyan print "Dark Cyan Text" color bold cyan print "Bold Cyan Text" color white print "White Text" color bold white print "Bold White Text" underline print "Underlined Text" color black color bold white print "Underline Off" reverse video print "Reverse Video" color black color bold white print "Reverse Video Off" score print "Scored Text" color black color bold white print "Scored Text Off" background black cls print "Black Background" background red cls print "Red Background" background green cls print "Green Background" background yellow cls print "Yellow Background" background blue cls print "Blue Background" background magenta cls print "Magenta Background" background purple cls print "Purple Background (Same as Magenta)" background cyan cls print "Cyan Background" background gray cls print "Gray Background" locate 20,10 print "Locate Test" print 10 print "Testing the line numbers" 20print "A Nother test" quit You can also use "system" in place of "quit," but I like "quit" because it's more English-like list files /home/retrojunkie/retro rem The line just above should never happen (it didn't) rem rem Subroutines and other nonsense rem label subrouti print "Here we are in the subroutine." print return rem label add2 add 2 to a return rem label printsum print "The sum is now "; print sum return Now is the time for all good men to come to the aid of their party. Now is the time for all good men to party. Now is the party for all good times to come.