| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Code FAQ [1 /15 |
'>>> Page 1 of Code FAQ begins here.
+-----------------------------------------------------------------+
| The Official FidoNet Quick Basic Echo's |
| (F)requently (A)sked (Q)uestions |
| CODE VERSION |
+-----------------------------------------------------------------+
Last changed: 07/15/2001
Edited by Greg Easthom of 1:153/715
greg_easthom{at}bandmaster.bc.ca
Credits to:
Dave Shea & David Aukerman 1:2255/10 for the creation
and maintenance of this CodeFAQ.
Suggestions, questions, and answers from everyone
in QUIK_BAS, too many to list.
If you use code or ideas from here, make sure you give credit
where credit is due.
New in this FAQ:
Nothing
Topics covered in the Code FAQ:
0) Introduction
1) What are TYPEs, and how do I use them?
2) What are SUBs and FUNCTIONs, and how do I use them?
2A) Sub Tutorial - learning how to use SUBs
3) How can I produce a delay in my program independent of the
CPU speed?
4) What are INTERRUPTs, and how do I use them?
5) Can I use INTERRUPTs with QBasic?
6) How do I use the mouse in QB?
7) How can I check for the existence of a certain file?
8) How do I perform a cold/warm boot through QB?
9) How can I put text on the screen in graphics mode without
destroying the background?
10) How do I print my graphics screens on a dot-matrix printer?
11) How can I animate sprites in QB?
12) Can I use VESA screen modes in QB?
13) Can I create a TSR in QB?
14) How can I make QB exit with an error level?
0) Introduction
This is the Code FAQ! Hopefully your most common questions will
be answered by this document. If not, go ahead and ask us at the
FidoNet QUIK_BAS echo, or e-mail me (Greg Easthom) and I'll get
an answer from them (or, less occasionally, from myself).
All full program pieces of code in this FAQ are designated by
the [begin] and [end] markers. Just copy the code in between
these two lines into your QB program, and it's ready to go!
Note: Any time you see code with an underscore ("_") at the end
of a line of code, you may need to connect the two lines
surrounding it if QB doesn't do it for you automatically. For
instance:
PRINT "hello wo_
rld!"
Should be:
PRINT "hello world!"
One more thing: any time you see the use of INTERRUPTs in a
piece of code, be sure to load QB with the /L switch.
Example: qb newcode.bas /L qb.qlb
...Enjoy!
1) WHAT ARE TYPES, AND HOW DO I USE THEM?
The TYPE statement lets you create your own data type, in
addition to QB's integer, double precision, and string types,
to name a few. You create a name for this new data type,
and you can then make a list of normal variables that will
become sub-variables in your TYPE. Think of a TYPE as a
variable itself, and then the sub-variables as answering the
question, "which part of that TYPE?" TYPEs are very good
at organizing many different variables into one recognizable
area. Here's an example of a TYPE:
TYPE ScreenType
'>>> Page 1 of Code FAQ ends here. Continued in next message.
* Brought to you by Greg's Little QBasic Auto-Poster *
--- Maximus 3.01
* Origin: The BandMaster, Vancouver, B.C., Canada (1:153/7715)SEEN-BY: 633/267 270 @PATH: 153/7715 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.