Chapter 1


e-me|links|files|help|contests|main|projects|aboutme|guestbook|survey|forum|chat|frames


Welcome! here is my first tutorial for my help section. I know you've waited 
awhile for this (not like you care), but it's finally here. here are the 
different keywords I'm going over in chapter one: (note: this is all on text,
and for complete beginners)
        
        1. What is Qbasic?
        2. print
        3. input
        4. tab
        5. locate
        6. color
        7. cls
        8. variables
        9. Printing with variables
       10. Inputing with variables

        tip: when you want to try out the program go to run at the top of the
        screen using the mouse or alt r and go to start. or press F5.
______________________________________________________________________________
                              
                              What is Qbasic?

Qbasic is a very simple programming language to use. It was made by microsoft, 
and the latest version is 4.5, but Microsoft doesn't indorse it, and you can't
find it anywhere. The older versions can be found either in the dos directory
or on the windows 95 CD in the olddos directory. Qbasic has very simple
commands, and is almost completely english. It is a beginners language designed
to get you prepared for more advanced languages, so don't worry you'll find it
very easy! Yes, some qbasic sites give qbasic 4.5 for free, but it is illegal
because it hasn't been released as freeware yet. So if you want it just go
to microsoft's home page. http://www.microsoft.com  and send them an email
saying they should release it as freeware. (I promise, if they have 500
different emails saying they should release qb4.5 as freeware, then they will
do it.) So EVERYONE please take just a little bit of your time, and email 
them, NOW!!!!!!
______________________________________________________________________________
                                   
                                   PRINT

One of the easiest words is print all print does is display text on the screen
heres how you use it:

PRINT "words"

notice how print is capitalized, whenever you type a correct line it will 
capitalize all commands or keywords. 

this will display the text   words   on the top left corner of the screen.

then whenever you type another print statement it will put it on the next line
down and still on the left side.

and if the text goes all the way to the bottom of the screen the top line will
be erased and all words will go up a line filling in it's place.

if you want to go down a line without put any words so you can put the words 
in the line you want to just type:

PRINT

this will take you down 1 line without printing anything.
______________________________________________________________________________
                                    
                                    Input

Input is used the exact same way as print only it's used to ask a question

so if you typed

INPUT "what is your name"

it would print the words as if it were using print, but it would let you type
in some words after the question, and when you are done you press enter.
(note: input automatically put's a question mark at the end of the words)
______________________________________________________________________________
                                
                                Tab
Now what if we don't want the text in the left side of the screen?
        Use tab
here's how it works:

PRINT TAB(1); "words"
       -or-
INPUT TAB(1); "what is your name"

what this would do is move the words to the right 1 tab, so if you wanted 3 
tabs you put a 3 instead of 1. (a tab is a a bunch of spaces, I think 5)
______________________________________________________________________________
                               
                               Locate
Now  what if we don't want to go over that many spaces?
        Use locate
here's how it works:

LOCATE 20, 15
PRINT "words"

this would take the words down 20 lines, and over 15 spaces and then print
words in that spot. This works, by far, the best if you want to move words to a
different spot on the screen.
______________________________________________________________________________

                                    Color

What if I want my text a different color.
       Use color
here's how you do it:

COLOR 1
PRINT "words"

this would change the color to blue and print words.
(expirament and find the other colors on your own there are only 0-15 colors.)

Also, after you change the color it will display all text in that color, so 
you'll have to change it whenever you don't want that color anymore.
______________________________________________________________________________
                                   
                                   CLS

What if we want CLEAR THE SCREEN(cls) and erase everything on it.
Use CLS
here's how you do it:

CLS

I know it's complicated, but you'll get the hang of it.
______________________________________________________________________________

                                Variables
What is a variable?
a variable is like your memory, it will remember 1 thing you tell it to until
you tell it to remember something else.

you can name it whatever you want as long as it is atleast 1 letter - 26 
letters, and starts with a letter.

here's how you use it:

a = 1
   
   -or-

a$ = "words"

   -or-

hello = 1
   
   -or-

hello$ = "words"

notice that if you want it to remember some words it must have a $ after it's
name, and quotes around the words you want it to remember. And you can have 
numbers in the name of the variable, but they can't start the name. 
ex.

hello1$ = "words"
 
 -or-

hi1whatever = 1

But try to give the variable a name that describes what it will do so you can
remember it.
______________________________________________________________________________
                        Printing with variables

all this does is let's you print whatever is inside a variable you've made.
here's how you use it

PRINT name

  -or-

PRINT name$

name is whatever you have called the variable. (note. if you don't tell what
the variable should remember earlier in the program, it will print 0 if it's a 
number type or it won't print anything if it's a letter type)
______________________________________________________________________________
                           
                           Inputing with variables
to input with a variable you do the same as print except it will have the 
variable remember whatever is typed.
ex.

INPUT "what is your name"; name$

        -or-

INPUT "what is a number"; name

what this will do is ask them the question and tell the variable to remember
their answer.(note. if you tell it to remember a number variable it won't let 
them type letters, after they press enter it will give them an error, and tell
them to retype the answer.)

what if you don't add a question

INPUT name
  
  -or-

INPUT name$

  -or-

INPUT

it won't print any words but it will still ask the question.

and if you don't use a variable it will still ask the question, but it won't
remember the answer.
______________________________________________________________________________
        Well that's about it for now. practice these things, and make sure you
 know exactly how they work. next time it will be a little bit tougher.

        Don't understand this? email me 
my Email: speige@hotmail.com
my URL: http://www.geocities.com/timessquare/Labyrinth/2690

chapter2 1