Qbasicnews.com

Full Version: More Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just finished http://chortle.ccsu.ctstateu.edu/cs113/cs113basic.html introduction to QBasic! Now I have some questions...

1.) What shall I learn next about QB?

2.) What are SUBS? I've been looken at example programs on this forum and I see SUB statements.

DECLARE, FUNCTION...END FUNCTION,
SUB...END SUB, CALL


3.) Is there more loops then just the Do while and For Loop?

4.) Is there any GUI Programming in QBasic?

5.) What was QB4.5 written in?

6.) Where are some good tutorials on Game Programming?
1) Make a simple game. Smile As you go on, learn.
2) Take this code:
Code:
SUB mySubRoutine
print "blah!"
END SUB
And then, in the main part of your program, type this:
Code:
CALL mySubRoutine
See what happens?
And may I suggest a great tutorial by Vic Luce on SUBs and FUNCTIONs...accessable from Qbasicnews.com, in the Learning section.
3) Well, there's DO WHILE, DO LOOP, WHILE LOOP, FOR NEXT, and, of course, the dreaded...
Code:
1:
GOTO 1
:lol:
4) Yeah, of course. Smile
5) Like all compilers, Assembly. The IDE was probably made in C, though.
6) Can't help ya there..but google around.
Quote:1.) What shall I learn next about QB?
Learn about whatever will help you carry out your tasks. The way I learn to program is to figure out what I need to do, and then learn the techniques to do it. A lot of self-taught programmers learn that way. It's more effective because you put new techniques to use immediately, rather than reading a bunch of stuff you'll rarely use and have to keep consulting references about it. Big Grin

Quote:2.) What are SUBS? I've been looken at example programs on this forum and I see SUB statements.

DECLARE, FUNCTION...END FUNCTION,
SUB...END SUB, CALL
SUB is short for SUBroutine. It's like your own custom Statement. Functions are the same, except Functions return a value. If you have any experience with C, you can think of a SUB as a void function.

Quote:3.) Is there more loops then just the Do while and For Loop?
There's also WHILE/WEND, but that's annoying.

Quote:4.) Is there any GUI Programming in QBasic?
Not intrinsicly. You'd have to have a GUI library, code one yourself, or use VBDOS.

Quote:5.) What was QB4.5 written in?
The IDE was written in C, the standard libraries were written in assembly.

Quote:6.) Where are some good tutorials on Game Programming?
http://www.gamedev.net/ is the best place that I know about...but there are specific sites out there as well. I like RPGDX and http://www.rpg-dev.net/ for RPG development. Smile
There you go!

The above link has some info about SUBs(subroutines).
Nek: Everything I said, spiced up. :roll:
Quote:Nek: Everything I said, spiced up. :roll:
Sorta Big Grin but that wasn't the intention...
That's okay. I just hate it when someone answers a question like this:
Code:
Yeah, PRINT "" prints the stuff in between the quotes.
And the next post is:
Code:
PRINT is an intrinsic QBasic command which will send characters specified in between the double-quotes to standard output.
Well, my post wasn't anything like THAT Tongue and yeah, that kind of thing's very annoying...
The most useful loop I have found is the for - next

Example

For i= 1 to 10

Print i

next i
Ya...FOR - NEXT is great for when you have a value you need incremented. A lot easier than setting up another variable and manually incrementing it Smile
Pages: 1 2