DO NOT TRY THIS AT HOME : Rotteneggs.com text files and message bases are for INFORMATIONAL PURPOSES ONLY. DO NOT undertake any project based upon any information obtained from this or any other web site.We are not responsible for, nor do we assume any liability for, damages resulting from the use of any information on this site.
(156 votes) Published: Sep 22, 2006 4:31 p.m. In 11 Favorites Lists Viewed 1063 times
If you think this is c/ped check at the end for proof that I made it!
Part 1: Overview You may be wondering what Quickbasic is. Well to put it simply, QuickBasic (Hereby
referred to as QBasic) Is a very simple to use
Programming language.
A good thing about QBasic is that it is 100% Free! That means that you can learn how to program with this language without spending a dime,
or spending time downloading it using a program such as Limewire.
Qbasic is powered by Microsoft Dos, and it does not need an installation. When you download it, you just double click 1 file, and it runs. Best of all, the whole file of
quick basic takes up only 1.32 MB! So Enough talking about how good it is, lets get programming!
::.............................................................................:: Part 2: Getting, and Running The Program
Alright so you want to start programming in QBasic. I guess first you will need to download it. Go to the following link: http://www.qbasic.com/wbb/filebase_entry.php?entryid=6&sid=43489975de05c4bd4cba6129017fb46f and click on the download button. It isn’t very hard to find, so just look for it on that page. Now once you download the file (Save it to your desktop just to make things easier) Right click it, and select "Extract To QB45" Or whatever the file is named. Now, simply click the file that you just extracted, and find the file named "QB". Its the program named QB, not the Lib file.
Now that you have QBasic on your computer, you can get programming! Well, Soon at least. You may be wondering what your looking at. Well right now you should just see a fairly small new screen on your computer. Inside of that screen you might see another black window that says survival guide, or a window saying "Welcome to Qbasic". If you do see one of those, just press the escape key on your keyboard to get rid of it. Now you should just see a boring blue screen with a flashing cursor, and the standard "File, Edit, View, Search..." Menu at the top.
See that little Line at the bottom of your screen that says Immediate? Well just to give yourself some more room, just use your mouse to drag that bar down as far as it will go, or press that little arrow on the top right hand corner. Now click back to underneath the bar that says Untitled. You should see a flashing cursor. Great! Now continue onto the next step.
::.............................................................................:: Part 3: The Basics
Make sure your typing under the Untitled bar. Now Type:
Print "Hello World" There! Thats your first program that you have ever created in QBasic! I bet you want to see what it does. Press F5 on your keyboard, and the screen should now become black, and the words "Hello World" Should be the only thing you see, other than the "Press any key to continue"
Ok, so what did you just do? Well typing the word Print Told the computer that it is going to write something. Having the quotations around Hello World Told the computer that it isn’t going to be writing an Integer. Finally having Hello World told the computer what to type. Thats why it was shown when you ran the "Program".
Press any key on your keyboard, to get out of the running screen. Now, press F5 again. What do you see? Well theres two Hello World’s written there! You only told the computer to type one. So we have to edit the code a little bit so when you run the program Hello World won’t be desplayed multiple times.
To do that press any key again, to go back to your code. Now above where you typed Print "Hello World" I want you to add:
CLS Now what CLS does, is it tells the computer to clear the screen every time the program is run. Just to test that, press F5 again on your keyboard, and you should see Hello WorldOnly printed once. Good that means the CLS is doing its job.
::..........................................................................:: Part 4: Variables
Alright now that you have made your first program, your going to edit it, so it does more than just say "Hello World" Go back to your code, and delete everything. Were going to now use some Variables. At the top, again add CLS telling the computer to clear the screen each time you run the program. Now, on a new line you are going to add:
X = 10 What does this do? Well it tells the computer that X is now a variable assigned the value of 10. To see what I mean add a new line, (Press Enter) and type:
Print X Notice how I didn’t add the quotes around the X? Thats because we don’t want the computer to type "X" We want it to print the value assigned to X in this case being 10. Your code should now look like this:
CLS
X = 10
Print X Press F5 to run your program. What do you see? The number 10 should be on the black screen.
::.............................................................................:: Part 5: Loops
Right now we want to start using loops. So right after CLS, add the word:
Do Now this is going to be a simple code, that will count up to 10. After Do add this:
X = X + 1 This is just stating that for now on the variable X will go up by one each time. Add this code
underneath:
Print X We want to print the variable X, because otherwise it would just show up as a blank screen when we ran this program. We are almost done, so add this below:
Loop until X = 10 Each time the program ran through the loop, X would be going up by 1. Telling the program to run until X = 10 will make it count to 10, and then stop, which is what we want.
Finally add this:
End This just tells the program to end once all this is done. Your finished code should look like below, if not change it!
Cls
Do
X = X + 1
Print X
Loop until X = 10
End Oh just another note. If you are going to be using a loop, add two spaces after Do like I did here. This will just make it easier on your eyes.
::.............................................................................:: Part 6: "Input"
What is "Input"? Well using the input code in QBasic, will allow the user of the program to interact with the program! Add your normal CLS Like usual, and lets get started. Add This:
Input "What is your name" A$ This will say "What is your name?" When you run the program. After that it will give you the option to type something in. Now add this:
Print "Hello " A$ This will type the word "Hello" Followed by the name entered into the input box. This can be used for many things such as calculator applications, or whatever else you can think of.
::.............................................................................:: Part 7: Conclusion Well the tutorial is over. I hope you learned enough to start making your own programs, because this tutorial took literally forever to write, and put together. If you are stuck,
just Google Qbasic tutorials or something. Alrighty have fun programming!
Tutorial completely written by Shane Roycroft A.K.A Freak Design A.K.A Languine, and only has premission to be displayed on my site (http://freak-design.co.nr) and RE.
Proof that I made this tutorial: I put this under helpful building guides... I guess it counts as building something... Programs?
PART OF THE TUTORIALS GROUP!
Sep 22, 2006 4:39 pm - cool im too lazy to read it but it looks detailed and i like your windows xp theme its awesome did you program it or dwonload it i gave you a 5 btw
Sep 22, 2006 5:01 pm - qbasic sucks, but i’ve used it for an equation before, better to just go straight to visual basic, QBasic honestly has no practical use that VB hasn’t completly overshadowed
So, because you don’t use that language, nobody else does? That makes this egg "Fair"?
That&r quo;s some shit. I don’t even own photoshop, but if the annoying and monotionous eggs are good, they get a fair rating.
It pisses me off when people vote as "I don’t need this"
either vote it good if it is good, or leave it alone
if it sucks give it a 0. Damn.
I soo agree its really annoying like on my egg (not advertizing just using as an example) i had a long period where i got a bunch of zeros cuz there were other was to do what i said and stuff
and ill probably never use programming till a few years but i still gave you a 5 on this cuz its cool and detailed
Sep 23, 2006 11:12 am - Qbasic, hahah you gotta be kidding me, but your egg is rather good on the topic so 5*... but if you really want to learn to progam in a language with much more potiental learn "perl" or "python" then move on to "C#"
Sure you can, I have!
You need to use the DATA and call a few libraries to get the mouse to work, but it really isnt all that hard, just take’s patience!
Mar 30, 2007 2:15 pm - from what i remember, what you wrote was ver batem out of the Qbasic book i learned out of... and besides, why would you want to teach anybody this? its worthless, even if you want to get into programming, its so much more archaic than C++ its not even funny. I think i actually have a copy of the book in my bathroom, but i dont use it for reading..1*
from what i remember, what you wrote was ver batem out of the Qbasic book i learned out of... and besides, why would you want to teach anybody this? its worthless, even if you want to get into programming, its so much more archaic than C++ its not even funny. I think i actually have a copy of the book in my bathroom, but i dont use it for reading..1*
Cool... 0* on your profile, every egg that you have, and your on my ban list now.
Do you even know what verbatim means you stupid little ass? Dont try to be smart by using big words, that you can’t even spell.
Apr 23, 2007 3:22 pm - great detail! great steps and EASY TO READ! :D good for people starting out in ANY kind of programming, good for understanding computer language! no matter how bad it may be :P thanks very much for this :D
5* and +faves :**
jimmy.
May 12, 2007 10:41 am - Really Good, 5* Defianitly.