The previous tutorials dealt with hard coding information into the program. This tutorial will cover getting user input.
The command to receive user input is named INPUT. INPUT will prompt the user to input data and then place the inputted data into a variable. INPUT’s string and the variable must be separated by either a comma or a semicolon.
The semicolon will print a question mark at the end of the text. (Years ago it was customary for the computer to get information, in the form of a question, from the user. Today, that is not the norm).
Code Download
QBT6_1.BAS
QBT6_2.BAS
QBT6_3.BAS
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