BASIC Programming/Beginning BASIC/User Input

Introduction
Read the Variables and Data Types article before reading this one.

User Input is one of the most important aspects of programming concepts. Every program should have some sort of user interaction, from getting a character's name for a game to asking for a password to log into a database. This article will teach the basics of user input in the BASIC Programming Language. Please note that the following code may vary from compiler to compiler. (FreeBASIC Users: Do not use line numbers).

Code
Example 1 (qBasic)
 * 1) you can copy it from here, hashtags do not do anything, it's a reminder.

Example 2 (freeBasic)

Explanation
Output What is your name? ...(Enter Your Name)... Hello, yourName, I am your computer, nice to meet you.

10: Dim userInput declares the variable userInput. As String tells the compiler that userInput is a string (A collection of pure text, can include numbers and symbols, but is considered text).

20: Input "What is your name?" prompts the user for their name.  userInput OR  a$ tells the compiler to store the answer in the variable in userInput or a$.

30: Makes a blank line.

40: A normal Print statement, ; tells the compiler not to skip to the next line.

50: Sleep makes the program wait for the user to press a key.

60: The ending to all BASIC programs, signifies a termination of the program.