Statements in QBASIC

A program consists of a series of statements. A statement is a computer instruction written in a source language, such as QBASIC, which is converted into one or more machine code instructions by a compiler. The commonly used QBASIC statements are: LET, PRINT, INPUT, CLS, END and REM. In QBASIC, the LET statement is used to assign a value to a variable. The PRINT command is used to display any message or value on the screen. The PRINT command cab be used in different variations to print the output in different forms. PRINT with semicolon is used to print the values one after another, without any space in between. PRINT with comma, print the values one after another with plenty of spaces in between. Only five values can be printed in one line. PRINT with TAB is used to move the print position to the column indicated in its argument. The INPUT statement in QBASIC is used to accept the data item from the user. Entered data can be string or variable. It prints a question mark on the screen. When the INPUT command is used, question mark sign is displayed on the output screen which indicates that the program needs some data for further execution. REM statement is a non-executable statement and stands for remarks. CLS statement is used to clear the screen. END statement is used to end the program execution.

To Access the full content, Please Purchase