Explanation
CONST Statement
Declares one or more symbolic constants.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
CONST constantname = expression [,constantname = expression]... |
constantname | The name of the constant. This name can consist of up to 40 characters and must begin with a letter. Valid characters are A-Z, 0-9, and period (.). |
expression | An expression that is assigned to the constant. The expression can consist of literals (such as 1.0), other constants, any arithmetic or logical operators except exponentiation (^), or a single literal string. |
CONST PI = 3.141593
INPUT "Radius of Circle: "; r
PRINT "Area = "; PI * r ^ 2