Frage deutsch
~~~~~~~~~~~~~~
Was ist der Unterschied zwischen QBasic und QuickBASIC?
 

Question English
~~~~~~~~~~~~~~
What's the difference between QBasic and QuickBASIC?
 

Antwort 1
~~~~~~~~~
[ von Thomas Antoni, 11.1999 - 7.12.2005 ]
 
QuickBASIC ist quasi der ältere Bruder von QBasic und war seinerzeit mehr für professionelle Programmierer gedacht. Im Gegensatz zu QBasic, das kostenlos im Lieferumfang von DOS ab V5.0 sowie in den Windows-Versionen 95, 98 und Me enthalten war, musste der QuickBASIC-Compiler für einige 100 EUR erworben werden. QuickBASIC ist 100%ig abwärtskompatibel zu QBasic.
 
*** Vorteile von QuickBASIC gegenüber QBASIC
QuickBASIC ist ein echter -> Compiler, erstellt ausführbare EXE-Dateien, während QBasic nur ein -> Interpreter ist, bei dem Probramme nur aus der Entwicklungsumgebung heraus gestartet werden können. Zum schnellen Austesten der Programme innerhalb der Entwicklungsumgebung beinhaltet QuickBASIC zusätzlich zu dem Compiler ebenfalls einen Interpreter.
QuickBASIC unterstützt die Einbindung von Programmcode aus externen Dateien mit MAK-Modulen und Bibliotheken und INCLUDE-Dateien (siehe unten)
QuickBASIC hat einige zusätzliche Befehle (siehe unten)
Die QuickBASIC-Entwicklungsumgebung bietet mehr Komfort. So ist z.B. die bei QBasic schmerzlich vermisste "Rückgängig-Machen-Funktion ("Undo") vorhanden, und eine Suchen/Ersetzen nur im markierten Bereich ist möglich.
*** Portieren von QBasic-Programmen nach QuickBASIC
Alle QBasic-Programme sind problemlos auch unter QuickBASIC ablauffähig und zu EXE-Dateien kompilierbar.
 
Bei Verwendung der Befehle CALL ABSOLUTE und CALL INTERRUPT und INTERRUPT[x] wird jedoch die Quick-Library QB.QLB benötigt, und QuickBASIC muß daher über 'QB /L' aufgerufen werden. Dies ist z.B. bei der bei der Verwendung fast aller Maus-basierten Programme der Fall. Siehe dazu auch den Eintrag "Wie kann ich die Fehlermeldung bei CALL ABSOLUTE vermeiden?" in der Kategorie "Fehlermeldungen und Fehlersuche".
 
Die erstellten Quellsprachedateien werden bei QuickBASIC standardmäßig in einem eigenen komprimierten Format gespeichert. Will man die Quellsprachedateien wie von QBasic gewohnt im reinen ASCII-Textformat speichern, so ist dies möglich über sie Option "Datei | Speichern unter... | Text von anderen Programmen lesbar".
 
*** Einbinden von Programmcode aus externen Dateien
Während bei QBasic nur über CHAIN und RUN Code aus anderen Quell- und Maschinensprachedateien einbindbar ist, bietet QuickBASIC zusätzlich die folgenden Möglichkeiten für die "modulare Programmierung":
INCLUDE-Dateien: Über den Metabefehl '$Include: 'DateiName' sind Quelltexte aus externen Dateien einbindbar.
MAK-Module: Man kann in der QuickBasic-Entwicklungsumgebung zwei oder mehr Programmdateien (so genannte MAK-Module) laden und gemeinsam ablaufen lassen oder zu einer EXE-Datei kompilieren. Jedes der Module kann im Maschinencode 64 KB groß sein. Danmit lässt sich die Speichergrenze für EXE-Programme von 64 KB auf 100...250 KB hinaufschieben. Der größere Wert gilt bei Compilierung mit dem Kommandozeilen-Compiler BC.EXE statt innerhalb der Entwicklungsumgebung QB.EXE. Jedes der Module darf aber trotzdem nie zu einem ausführbaren Maschinencode von über 64 KB führen. Man unterscheidet dabei Hauptmodule und Untermodule. Nur das Hauptmodul enthält normalerweise auf der obersten Ebene ausführbaren Code, während die Untermodule nur SUBs und FUNCTIONs enthalten. Die Vorschrift für das Zusammenbinden der Module schreibt QuickBASIC automatisch in eine .MAK-Datei.
Bibliotheken: Eine Bibliothek (engl. "Library"). ist eine Sammlung von SUB's, FUNCTION's, die in einer externen Datei gespeichert sind. Bei QuickBASIC gibt es zwei Arten von Bibliotheken: normale Link-Bibliotheken (Dateiendung .LIB) und Quick-Bibliotheken (.QLB). Quick-Bibliotheken können innerhalb der QuickBASIC-Programmierumgebung vom Interpreter genutzt werden, wenn sie beim Laden von QB durch QB /<Bibliotheksname> mitgeladen wurden. Link-Bibliotheken können nur mit Hilfe des QuickBASIC-Linkers zusammen mit dem Anwenderprogramm zu einem EXE-Programm zusammengebunden werden.
 
*** Zusätzliche Befehle und Schlüsselwörter bei QuickBASIC
QuickBASIC 4.5 kennt einige zusätzliche Befehle gegenüber QBasic. Die wichtigsten sind:
 
- '$INCLUDE - Compiler-Anweisung zum Einfügen von Quelltext aus einer anderen Datei (Include-Datei; darf nur im Hauptprogramm, nicht in einer SUB/FUNCTIOn stehen)
- ALIAS - Verweist auf den Namen einer 'Nicht-BASIC-Prozedur"
- BYVAL - Bewirkt 'Call by Value' statt 'Call by Reference' für einenParameter, der an eine Nicht-Basic-Prozedur übergeben wird
- CDECL - Bewirkt die Parameterübergabe an eine Prozedur gemäß den Konventionen der Programmiersprache C.
- CALLS - Aufruf von Subroutinen, die in anderen Programmiersprachen geschrieben wurden (Nicht-Basic-Prozeduren)
- COMMAND$ - Liefert die Befehlszeile zurück, mit der ein QickBasic-EXE-Programm aufgerufen wurde und ermöglicht so, Übergabeparameter abzufragen (siehe "Wie kann ich Parameter an ein Programm übergeben?" )
- LOCAL | SIGNAL - für künftige Anwendungen reservierte Schlüsselwörter
- SADD - Offsetadresse einer Stringvariablen
- INTERRUPT | INTERRUPTX | INT86 | INT86X - direkter Systeminterrupt-Aufruf
- SETMEM - Verändern des 'Far-Heap'-Speicherbereichs
- UEVENT | EVENT - Anwenderdefinierte Ereignisverfolgung
 
Weitere Informationen findest Du im LEXIKON unter -> QBasic und -> QuickBASIC
 
*** Fehlermeldungen beim Starten von QBasic-Programmen mit QuickBASIC
Bei QBasic-Programmen, die den CALL ABSOLUTE-Befehl enthalten kommt es zu einer Fehlermeldung, wenn man sie mit QuickBASIC aufruft. Dies Problem kann man aber leicht beseitigen, indem man QuickBASIC mit der QLB-QuickLibrary aufruft, z.B. über QB /L meinprog.bas; siehe auch die Frage -> "Wie kann ich die Fehlermeldung bei CALL ABSOLUTE vermeiden?" in der Kategorie "Fehlermeldungen und Fehlersuche".
 
 

Antwort 2
~~~~~~~~~
[ von East-Power-Soft (
www.east-power-soft.de ) im QB-Forum, 25.12.2005 ]
QBasic vs QuickBasic" oder "Der Unterschied zwischen Compiler und Interpreter
 
Vor dem eigentlichen Programmieren steht die Wahl des richtigen Interpreters oder Compilers. Da stellt sich für Anfänger als erstes einmal die Frage, wo der Unterschied zwischen beiden liegt, oder anders ausgedrückt: "was ist eigentlich ein Interpreter bzw. Compiler?".
 

QBasic war und ist ein Interpreter. Interpreter heißt, dass das damit erstellte Anwenderprogramm, wenn es gestartet wird, Zeile für Zeile übersetzt - also interpretiert - und ausgeführt wird. Diese Programme benötigen zu ihrer Ausführung die Entwicklungsumghebung
QBASIC.EXE. Sie sind also nicht alleine lauffähig. Anders ausgedrückt: "Es sind nur BAS - Dateien und keine EXE oder COM - Dateien".
 

QuickBASIC ist so etwa 99,999998%ig kompatibel zu QBasic. Die Unterschiede liegen in der Leistungsfähigkeit und dem Funktionsumfang. Trotzdem sollten alle QBasic Programme in der QuickBASIC-Entwicklungsumgebung laufen und können nun zu selbstständig lauffähigen EXE-Programmen kompiliert werden. Die Version 4.5 gibt es in Deutsch, aber auch in Englisch
 

QuickBasic Extended bezeichnet die Version 7.1 von QuickBasic, diese wird oftmals auch PDS (Personal Development System) genannt. Dort haben die Entwickler nun auch endlich Befehle zum Auslesen des Directory's und zur Arbeit mit Datenbanken und dem erweiterten Speicher eingebaut. (Anmerkung: Meiner Meinung nach keine ausreichende Weiterentwicklung, aber das muß jeder selbst entscheiden.) Die Version 7.1 gibt es nur in Englisch
 

Visual Basic für DOS (Version 1.0) ist die älteste Version des Visual Basic Konzepts. Sie ist mittlerweile ebenfalls auf einigen Webseiten kostenlos zu bekommen und bietet dem Programmierer die Möglichkeit, Objekte wie Menüs, Buttons, Fenster usw. einzusetzen. Aber Vorsicht! Wer jetzt überhastet auf den Download Button drückt, ist möglicherweise enttäuscht. Wie gesagt ist dies die erste Version und nur für MS-DOS. Somit ist das GUI (Graphical User Interface) natürlich auch stark vom MS-DOS Textmodus abhängig und sieht dementsprechend aus. Man könnte es mit der Oberfläche der QuickBasic-IDE (Integrated Development Environment - also der Entwicklungsumgebung) vergleichen. Die Basic Sprache selbst ist aber zu 100% kompatibel mit QB. Man könnte VB für DOS somit als letztes Programm der QB Reihe ansehen.
 
Answer 3
~~~~~~~~~
QBasic and QuickBASIC are both released by Microsoft. QBasic is only a QBasic editor, allowing you to write, save, open, and run QBasic programs, but not compile them. On the other hand, QuickBASIC is not on a QBasic editor but it is also a QBasic compiler, meaning that it has the ability to convert QBasic files into executable files.
 

Answer 4
~~~~~~~~
"What is the difference between QBASIC and QuickBASIC?"
 
A lot! Some of them are:
QBASIC will not compile a BAS file into a EXE, QB45 does.
QBASIC does not have a CALL INTERRUPT, QB45 does.
QBASIC does not allow use of LIBs, QB45 does.
QBASIC is a stripped down version of QB45 included with DOS 5.0 and above.
QuickBASIC must be purchased. The retail price varies but should be around $65-$80 U.S..
 
Generally, almost all BAS code will run in QBASIC. The exception is that if is uses INTERRUPTS or outside LIBs, it will not. There is however a CALL ABSOLUTE that does allow SOME access to ASM code but it is not simple and the routines must be small. Generally, if you are an occasional programmer, QBASIC will do just fine, however, if you want to end up with an EXE file or do some serious programming, QB45, or PDS would really be the way to go. Other packages available are Power Basic and Visual Basic for DOS. These other two packages are fine too and provide some additional commands over QB45 but as such are not backward compatible to QB45.
 

Answer 5
~~~~~~~~
QBasic is freeware, it is bundled with every distribution of DOS/Windows since v5.0 of DOS (I believe). If you have Windows 95/98, do a search for QBASIC.EXE on your CD, and you'll find it. QuickBASIC, however, is not freeware, and its copyright HAS NOT run out (like some might think). I guess people will believe anything, but anyway, QuickBASIC (or QB), is a commercial compiler. Unlike QBasic, QB can compile your code into executables. MS no longer sells QB... in fact, does MS sell any DOS products anymore?


Answer 6
~~~~~~~~
[ by Mike Audleman ]
.
"What is the difference between QBASIC and QuickBASIC?"
.
A lot! Some of them are:
QBASIC will not compile a BAS file into a EXE, QB45 does.
QBASIC does not have a CALL INTERRUPT, QB45 does.
QBASIC does not allow use of LIBs, QB45 does.
QBASIC is a stripped down version of QB45 included with DOS 5.0 and above.
QuickBASIC must be purchased. The retail price varies but should be around $65-$80 U.S..
 
Generally, almost all BAS code will run in QBASIC. The exception is that if is uses INTERRUPTS or outside LIBs, it will not. There is however a CALL ABSOLUTE that does allow SOME access to ASM code but it is not simple and the routines must be small. Generally, if you are an occasional programmer, QBASIC will do just fine, however, if you want to end up with an EXE file or do some serious programming, QB45, or PDS would really be the way to go. Other packages available are Power Basic and Visual Basic for DOS. These other two packages are fine too and provide some additional commands over QB45 but as such are not backward compatible to QB45.
 
 

Answer 7
~~~~~~~~~~~~~~
[ by Isaac Grover (
isaac.grover@dinuba.com - www.psnw.com/~dinuba/basic/qb_faq.html ), April 15, 1997 ]
 
 
Differences between QBasic, QB (QuickBASIC 4.4) and PDS (QuickBASIC 7.1)
QBasic, the BASIC interpreter that comes with MS-DOS
v5.0-7.0, was a significant improvement over GW-Basic and
BASICA in that QBasic didn't require the use of line numbers
to interpret the code, and the use of SUBs and FUNCTIONs
allowed the programmer to modularize code instead of having
to overuse GOSUBs and GOTOs. QBasic also featured an
Integrated Development Environment (IDE), making the
development of programs a far easier task.
 
Like QBasic, QuickBasic 4.x (a.k.a. QB, QB4.x), includes an
IDE, but also functions as a compiler. QB4.5 includes
support for external libraries, expanding its capabilities to
make room for superior graphics and quality sound, along with
other incredible programming feats. In addition, QB4.5 is
capable of using command-line parameters and BIOS/DOS
interrupts, greatly increasing its power over QBasic. Also
included in QB's IDE are Watches/Watchpoints, History, and
Break on Error--all things very helpful in debugging a
program. In addition, QB4.5's Help files are more detailed,
especially in the Examples area.
 
The following statements, functions, and keywords are
supported in QB and PDS, but not in QBasic:
 
ALIAS EVENT LOCAL SETMEM
BYVAL $INCLUDE SADD SIGNAL
CDECL Int86 Interrupt UEVENT
COMMAND$ Int86X InterruptX
 
Note: SADD is said to be supported by QBasic, but QBasic
Help says it isn't and there are no instructions.
 
PDS (a.k.a. QuickBasic Professional Development System 7.x,
BASIC7) offers the following advantages compared to QuickBASIC:
 

o
IDE (QBX.EXE) related:
o Uses expanded memory for program objects between 512 bytes and
16K in size (a "program object" is a SUB, FUNCTION, etc.), thus
allowing you to develop larger programs within the IDE.
o Utilizes the HMA to make an additional 63K available for your
programs, again, allowing the development of larger programs
within the IDE.
o Allows optional disabling of the Help and Utility menus, which,
again, allows for larger programs.
BTW, the Utility menu is user-definable and allows one to
configure programs which can be SHELLed to from within the IDE.
 
o Compiler/Linker related:
o Produces smaller and faster code, partially because the compiler
will, in some cases, generate better code, but also because the
library is more "granular" (i.e., when linking, less unused code
is included).
o Includes various "stub" files that can be used when linking to
stub out various features that you determine are unneed, thus
decreasing the size of the executable. For example, there are a
group of "TSCNIOxy.OBJ" files (where "x" is "N" for near
strings, or "F" for far strings, and "y" is "R" for real mode
(DOS) or "P" for protected mode (OS/2)); they are used to stub
out most of the more advanced video routines if you are doing
simple screen output.
o A few language enhancements. Two that come to mind are DIR$()
which is kind of like a findfirst/findnext, and REDIM PRESERVE
which can be used to change the size of an array while retaining
its contents. Also, you can have arrays within user-defined
types, which QB does not allow.
o Overlaid programs of up to 16MB supported - will swap to EMS or
disk to accomplish this.
o A host of toolkit libraries are included, including charting,
user interface (these can be used to create an interface similar
to QBX's own IDE), date/time, matrix math, etc.
o You can create text-mode, 16-bit OS/2 executables.
 
o Tools related:
o Includes Programmer's Workbench, which, among other things, can
make it easier to develop multiple-module, mixed-language
programs.
o Includes CodeView, and a few other miscellaneous utilities.
 
The following statements, functions, and keywords are supported
in PDS, but neither in QBasic nor QB (many are related to ISAM):
 
BEGINTRANS CURDIR$ INSERT SIGNAL
BOF DELETE MOVEdest SSEG
CCUR DELETEINBDEX RETRIEVE SSEGADD
CHDRIVE DELETETABLE ROLLBACK STACK
CHECKPOINT DIR$ SAVEPOINT TEXTCOMP
COMMITTRANS EVENT SEEKoperand UPDATE
CREATEINDEX GETINDEX$ SETINDEX ON LOCAL ERROR
 
 
*** Differences between PDS 7.00 and PDS 7.10
PDS 7.00 for DOS and OS/2 (11/9/89):
 

Addition of:
- ISAM files for MS-DOS
- Linker code overlays
- Better size and speed
optimizations
- CURRENCY data type
- Local error handling
- Arrays in user TYPEs
- Far strings
- Expanded memory
- 80286 instructions
- QuickBASIC Extended
- Date/time, financial,
format libraries
- Matrix math toolbox
- User Interface toolbox
 

Problem corrections: (fixlist7.00)
 
 
PDS 7.10 for DOS and OS/2 (6/24/90):
Addition of
: - ISAM for OS/2
- ISAM faster than 7.00
- Programmer's WorkBench
- C 6.00 compatibility
- More-efficient QBX.EXE expanded
memory usage (1K granularity for
procedures < 16K)
- REDIM PRESERVE
- CALL by value for SUB/FUNCTION
parameters
- Pass fixed-length string arrays
as parameters

Problem corrections: (fixlist7.10)
 
Note:
The release dates shown above are taken from the
following files on the product distribution disks:
BC.EXE from versions 6.00, 6.00b, 7.00, and 7.10,
and BASCOM.EXE from versions 5.35 and 5.36.
 
 

[ The QBasic-MonsterFAQ --- Start Page: www.antonis.de/faq ]