QBasic Tutorial 8 - Select Case Statements - QB64 


Select-Case statements work like If statements. The difference is that the Select-Case statement can make the code simpler to read and work with than If statements. In some computer languages and computer systems, the Select-Case statements run faster than the If statements.

Creating a Select-Case statement is simple to do. The next program will prompt the user to select the key A-D and the program will respond by telling the user what key was entered. We will create a Select-Case statement for the A-D keys entered.

Code Download
QBT8_1.BAS
QBT8_2.BAS



QBasic / QB64 Links

QB64 is a free download at www.qb64.com

QB64 Wiki & Manual is found at qb64.com/wiki.html

QBasic 1.1 comes with OldDOS. A zip file of OldDOS can be found at www.pcxt-micro.com/download.html

QBasic 1.1 needs DOSBox to run on Windows Vista and greater, Mac, and Linux.
DosBox is a free download at www.dosbox.com

Free QB64/QBasic Code

QBasic.Net - www.qbasic.net

Pete's QBasic Site - www.petesqbsite.com/index.php

QB45 - qb45.org

Phatcode - games.phatcode.net