<h1> QBASIC!! </h1>

Free Web Hosting : Free Hosting : Troubled Teens : Report Abuse

This is the QBasic tutorial section. Read on, and soon you'll be programmin' a text based game....


PRINT


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


Beep is also a VERY simple command. Just type in

BEEP

Now hit run.You should hear a beep. Cool, huh?


INPUT


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!


VALUES


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?


LPRINT


This is very simple. Just use it like print only whatever is in the quotes will be printed on your actual printer!!


LOCATE


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!"


This should get you started. If you want more advanced info...go to Qbasic.com If this link sends you to a Microsoft site, I'm sorry...Just look for it at Yahoo.com

Home