This is the QBasic tutorial section. Read on, and soon you'll be programmin' a text based game....
PRINT is the simplest of commands. (At least I think, and you'll probably soon agree with me!) The PRINT command will print whatever you put in quotes. Let's try this ourselves. Type exactly this... PRINT "HI!! How dost thou today?" Now, hit run, and you should see the words: HI!! How dost thou today?
Beep is also a VERY simple command. Just type in
BEEP
Now hit run.You should hear a beep. Cool, huh?
Input is also simple. Just type INPUT in your code and when you run it, you should see a ? and after it is whatever you hit on your keyboard. Neat huh? This may not seem useful now, but it is actually the main way to let the user interact with your programs. You'll see why it's so useful later!
No INPUT command is complete without this. Just put a letter, number, or string of both before a $ sing. So, let's say you wanted the cpu to respond to a name, to pesonalize your prog. Type:
PRINT "What's your name?" INPUT name$ PRINT "Well hello" name$
Cool,huh?
This is very simple. Just use it like print only whatever is in the quotes will be printed on your actual printer!!
Locate locates your cursor where you tell it to and then carries out commands like normal. Just put the X and Y cooridinates after LOCATE. Ex. LOCATE 10,20 : PRINT "Now it prints this in another part of the screen!"