Jump to content

My first programming tutorial - Qbasic

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
ahsan16

ahsan16

    Learning Programmer

  • Members
  • PipPipPip
  • 36 posts
This was my first program in Qbasic.
--begin program---------------
CLS
PRINT"Hello!"
PRINT
PRINT"This is my first program!"
--end program-----------------
CLS
This is just a list of commands that the computer will interpret and execute. Go up to the "RUN" menu and click "START". The scren will clear, and look something like this, with a "Press any key to continue" on the bottom of the screen.

Hello!
This is my first program!

Notice it doesn't say CLS, or PRINT, or anything. It does give you a "Press any key to continue" message, but that's just QBasic's way of telling you it's done with it's work.

To begin with the explanation, the command 'CLS' stands for CLear Screen, and PRINT is quite self-explanatory. Just make sure that when you're PRINTing, have quotes on each side of what you want the screen to display. Fool around with the two commands until you get used to them. People who are already familiar with the menus at the top of the screen (and their function) can skip the next paragraph.

To begin a new program, go to the "FILE" menu and click "NEW." BEWARE - any program in memory will be LOST FOREVER if it is not saved. If you want to save a program, go to the "FILE" menu and click "SAVE." QBasic will prompt you for a file name, and your program will be saved to disk. If you want to load that program again, go to the "FILE" menu and click "LOAD". You will get a dialog of what QBasic files are in your directory. Double-click on the one you want to load.

#2
xtraze

xtraze

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 910 posts
Thanks dude, but for what can I use Qbasic, looks like MS.DOS to me. Anyway thank you for starting this thread. Let's put something more than CLS, andlearn Basics of Programming.