Getting Started
Introduction
Sample Programs
QBasic IDEs
History
Advice
Tools
Mini-Tutorial
Tutorial
Code Snippets

Resources
Web Sites
More Tutorials
Vendors
Books
Magazines
NewsLetters
NewsGroups
Forums
User Groups
Talk Shows
Blogs

GBIC >> QBasic >> Advice

QBasic vs GW-BASIC
One good thing about GW-BASIC is that it is very, very simple and is an excellent tool for teaching programming to a complete beginner. It's very, very simple. The problem is that it lacks virtually all features of a modern language, making it a poor choice for any long term programming needs.

QBasic, while also very simple, does not provide many of the features you'll find in modern languages. For that reason, I highly recommend QBasic over GW-BASIC. This page documents the differences between the two languages, clarifying the advantages of using QBasic.

You may also want to read these articles from the Microsoft Knowledge Base on feature and behavior, differences between QBasic and GW-BASIC.

Summary of Differences
Here's a comprehensive listing of the differences between QBasic and GW-BASIC. These are all features available in QBasic but not in GW-BASIC.

IDE Changes

  • Window GUI Interface with Drop Down Menus
  • Mouse Support
  • Split Screen (View Window and Immediate Window)
  • Help File with Cut/Paste Transfer to View Window
  • IEEE Floating Point Math
  • P-Code (Near Compilation Execution Speed)
  • Advanced Debugging (single/procedure step, trace animation, breakpoints, edit/continue)
  • On entry syntax checking
  • Search/find/replace
  • Online Help

Syntax Changes

  • Line Numbers Optional
  • Labels

Flow Control

  • Select Case
  • ElseIf Added to If Statement
  • Do While|Until ... Loop
  • Do ... Loop While|Until

Declarations

  • Constants
  • Dynamic Array Sizing (REDIM)
  • User Defined Types
  • Fixed Length Strings
  • Long Integers
  • Array $STATIC/$DYNAMIC Metacommands

File/Directories

  • Binary File Open Mode
  • Byte level positioning (SEEK)

Miscellaneous

  • Increased number of screen modes (VGA)
  • Timed Suspension of Program (SLEEP)
  • Recursion
  • Increased Code/Data capacity (to 160K)

Arithmetic Operators

  • MOD Operator

Sub/Functions

  • Named Sub/Functions
  • Argument Passing (with Any/As)
  • Global and Local Variables
  • Maintain Sub/Function variable values between calls
  • On Error RESUME NEXT option
  • Procedure access to module-level variables (SHARED)