Hi grilse-ga,
While Microsoft stopped developing and supporting QBasic a long time
ago, it's many fans have ensured that Qbasic still remains fairly
popular among beginning programmers. Unfortunately, there are no
official QBasic compilers available. Still, there are a number of them
which are mostly(99%) QBasic compatible. But, keep in mind that,
depending on what your code does, there may be places where you need
to modify your code in order to get it to compile.
Here is a list of basic code compilers that are mostly QBasic
compatible:
- MS QuickBASIC: Microsoft QuickBasic is a scaled up version of
Qbasic and your best bet. It looks and feels just like QBasic. The
only difference is that under the "Run" menu there is an extra command
"Make EXE File". Most of your programs should run unmodified in
QuickBasic. For a discussion of how Qbasic differs from QuickBasic,
see:
- UWL's QBasic FAQ Sheet PART 1
( http://members.aol.com/_ht_a/uwlabs/faq1.htm#differ )
You can download various versions of QuickBasic (for free) from :
- QuickBasic Cafe > QBasic Compilers
( http://www.qbcafe.net/english/dl_pages/compiler/index.html
)
- BCX : BCX is a BASIC to C source code convertor, and is free for
personal and professional use. Keep in mind though, that it does not
directly compile your BASIC programs. Instead, it converts your BASIC
code to C code, which you can then compile with a C compiler to
produce a Windows exe file.
For more information, check out BCX's homepage at:
- BCX : The Basic to C Translator by Kevin Diggins
( http://bcx.basicguru.com/ )
- PowerBasic: This is very popular commercial compiler for BASIC
programs, on both DOS and Windows platforms. Although it supports a
number of QBasic statements/keywords, it is not 100% compatible(The
DOS version claims 99% compatibility). So, if you don't mind switching
to an alternative version of BASIC, this product comes highly
recommended.
For a comparison between the keywords supported by QuickBasic and
PowerBasic, see:
- PowerBASIC: The PowerBASIC Language
( http://www.powerbasic.com/support/technote/features.asp
)
For a list of various PowerBasic Compilers, see:
- PowerBASIC: Compilers
( http://www.powerbasic.com/products/compiler.asp )
For a list of compilers/interpreters available for the various
dialects of BASIC, check out:
- BASICGuru Compilers/Interpreters List
( http://www.basicguru.com/abc/compilers.html )
+----------------------------------------------------------+
To answer the second part of your question, compiling your programs
will usually result in a huge speed boost and decrease in loading
times. If you use a DOS compiler(QuickBasic, PB for DOS), then a DOS
executeble is created, which will run in DOS and (slightly slower) in
Windows. If you use a Windows compiler(BCX, PB for Win) then the exe
will run only in Windows, as a native application.
+-----------------------------------------------------------+
Hope this helps.
If you need any clarifications, please ask. I will be glad to be of
help.
Please do not rate this answer until it completely satisfies your
needs.
Thank You,
Theta-ga
========================================
Google/GoogleGroups Search Terms used:
compile qbasic programs windows
compile qbasic programs |
Clarification of Answer by
theta-ga
on
22 Apr 2003 06:19 PDT
Hi grilse-ga,
Since QBasic was a language that evolved with every new release of
the package, running code written on the later versions of QBasic on
the older versions, may require making (sometimes major) changes to
your program.
In your case, I recommend you try QBasic version 4.5 or above, as
they come with better online help, and also support the LINE INPUT, DO
LOOP WHILE and SLEEP statements.
As for the Qbasic variable naming conventions, it does not require
you to append the $ and % symbols to distinguish between the variable
data type. You can still add these symbols if you so desire, but their
presence or absence makes no difference to the Qbasic compiler.
If you are looking for help with QBasic, there are a number of
resources for you to try on the net. The Google Web Directory lists
pages related to QBasic programming here:
- Google Directory:Computers>Programming>Languages>BASIC>QBasic &
QuickBasic
(http://directory.google.com/Top/Computers/Programming/Languages/BASIC/QBasic_and_QuickBasic/)
Most of the sites have tutorials or FAQs for newbies, which should
answer most of your questions. Many also provide chatrooms and forums
where you can have your questions answered by other QBasic
programmers.
Hope this helps.
If you need any clarifications, just ask!
Regards,
Theta-ga
:-)
===============================
RELATED LINKS:
- Differences in various versions of QuickBASIC
(http://www.geocities.com/thetropics/9964/qhelp3.html)
- The QBasic Page
(http://www.qbasic.com/qbindex.shtml)
- List of QBasic Keywords
(http://members.tripod.com/~connorr/guide/syntax/index.htm)
|