Qbasicnews.com

Full Version: qbasic news community wide program
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i thought of this idea as maybe a learning opportinity for newb's so here it is. Everyone adds between 1-10 lines of code to the end of the program to make a qbasic news program leaving remarks for what it does. The program could do anything it just matters what you make it. Ready, Set, Go!
(i'm not starting)
Code:
SCREEN 0 ' set text mode
WIDTH 80, 25 ' set good text mode
CLS ' clear srceen
DIM array(1 TO 127) AS STRING * 1 ' makes mystery array ;)
Code:
SCREEN 0 ' set text mode
WIDTH 80, 25 ' set good text mode
CLS ' clear srceen
DIM array(1 TO 127) AS STRING * 1 ' makes mystery array ;)
RANDOMIZE TIMER ' Randomizes timer
DO
  FOR I = 1 TO 127 ' Duh;)
    array(I) = INT(RND * 44) + 32 ' insert some crap
    IF INT(RND * 2) +1 = 2 THEN
      LOCATE (INT(RND*80)+1, INT(RND*25)+1)  ' Locate a random pos
      PRINT array(INT(RND * 127))  ' Print some crap. Might be something there, might not ;)
  NEXT I
LOOP UNTIL INKEY$
CLS
Code:
SCREEN 0 ' set text mode
WIDTH 80, 25 ' set good text mode
CLS ' clear srceen
DIM array(1 TO 127) AS STRING * 1 ' makes mystery array ;)
RANDOMIZE TIMER ' Randomizes timer
DO
  FOR I = 1 TO 127 ' Duh;)
    array(I) = INT(RND * 44) + 32 ' insert some crap
    IF INT(RND * 2) +1 = 2 THEN
      LOCATE (INT(RND*80)+1, INT(RND*25)+1)  ' Locate a random pos
      PRINT array(INT(RND * 127))  ' Print some crap. Might be something there, might not ;)
  NEXT I
LOOP UNTIL INKEY$
CLS

COLOR 4  'Using red as foreground colour
PRINT 6*7  'Printing the meaning of life the universe and everything
COLOR 0,15  'Using black as foreground color, white as background
PRINT "Calculating explanation of above answer"  'Crap
SLEEP  'Press the Anykey
COLOR 14,4  'Yellow foreground, Red background
PRINT "CALCULATION ABORTED" 'Crap
Quote:SCREEN 0 ' set text mode
WIDTH 80, 25 ' set good text mode
CLS ' clear srceen
DIM array(1 TO 127) AS STRING * 1 ' makes mystery array
RANDOMIZE TIMER ' Randomizes timer
DO
FOR I = 1 TO 127 ' DuhWink
array(I) = INT(RND * 44) + 32 ' insert some crap
IF INT(RND * 2) +1 = 2 THEN
LOCATE (INT(RND*80)+1, INT(RND*25)+1) ' Locate a random pos
PRINT array(INT(RND * 127)) ' Print some crap. Might be something there, might not
NEXT I
LOOP UNTIL INKEY$
CLS

COLOR 4 'Using red as foreground colour
PRINT 6*7 'Printing the meaning of life the universe and everything
COLOR 0,15 'Using black as foreground color, white as background
PRINT "Calculating explanation of above answer" 'Crap
SLEEP 'Press the Anykey
COLOR 14,4 'Yellow foreground, Red background
PRINT "CALCULATION ABORTED" 'Crap

This has got off to a bad start already...people arent going to take this thing seriously...but still, ill add something:

Code:
SCREEN 0 ' set text mode
WIDTH 80, 25 ' set good text mode
CLS ' clear srceen
DIM array(1 TO 127) AS STRING * 1 ' makes mystery array  
RANDOMIZE TIMER ' Randomizes timer
DO
FOR I = 1 TO 127 ' Duh;)
array(I) = INT(RND * 44) + 32 ' insert some crap
IF INT(RND * 2) +1 = 2 THEN
LOCATE (INT(RND*80)+1, INT(RND*25)+1) ' Locate a random pos
PRINT array(INT(RND * 127)) ' Print some crap. Might be something there, might not  
NEXT I
LOOP UNTIL INKEY$
CLS

COLOR 4 'Using red as foreground colour
PRINT 6*7 'Printing the meaning of life the universe and everything
COLOR 0,15 'Using black as foreground color, white as background
PRINT "Calculating explanation of above answer" 'Crap
SLEEP 'Press the Anykey
COLOR 14,4 'Yellow foreground, Red background
PRINT "CALCULATION ABORTED" 'Crap

While inkey$ = "" :wend 'guy above didnt do a gr8 job of finishing off
CLS
screen 13

for pixeller = 1 to array(INT(RND * 127)) 'using the array...
pset ( int(rnd*319), int(rnd*199)),(rnd*10) 'random pixel
next pixeller
Umm, I think you guys just assumed the type of my array was Integer. It isn't. Look again. Also I added some, a little.

Code:
SCREEN 0 ' set text mode
WIDTH 80, 25 ' set good text mode
CLS ' clear srceen
DIM array(1 TO 127) AS STRING * 1 ' makes mystery array  
RANDOMIZE TIMER ' Randomizes timer
DO
FOR I = 1 TO 127 ' Duh;)
array(I) = INT(RND * 44) + 32 ' insert some crap
IF INT(RND * 2) +1 = 2 THEN
LOCATE (INT(RND*80)+1, INT(RND*25)+1) ' Locate a random pos
PRINT array(INT(RND * 127)) ' Print some crap. Might be something there, might not  
NEXT I
LOOP UNTIL INKEY$
CLS

COLOR 4 'Using red as foreground colour
PRINT 6*7 'Printing the meaning of life the universe and everything
COLOR 0,15 'Using black as foreground color, white as background
PRINT "Calculating explanation of above answer" 'Crap
SLEEP 'Press the Anykey
COLOR 14,4 'Yellow foreground, Red background
PRINT "CALCULATION ABORTED" 'Crap

While inkey$ = "" :wend 'guy above didnt do a gr8 job of finishing off
CLS
screen 13

for pixeller = 1 to array(INT(RND * 127)) 'using the array...
pset ( int(rnd*319), int(rnd*199)),(rnd*10) 'random pixel
next pixeller

DIM theScreen (0 TO 320, 0 TO 200) AS STRING * 1
FOR y% = 0 TO 320
        FOR x% = 0 TO 200
                theScreen(x%, y%) = CHR$(INT(RND * 256))
        NEXT x%
NEXT y%