QBasic 1.1: CONST Statement


CONST constantname = expression [,constantname = expression]...

Description / Parameter(s)

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