BASIC Constants

Constants are predefined values that do not change during program execution. There are two basic types of constants They are.

(i) String Constant: They are alphanumeric characters between 0 to 32, 767 end closed fl double quotation marks. Examples are “BASIC” Jesus is my lord and personal savior”

(ii) Numeric Constant: They are positive or negative numbers. They range from small whole numbers to large real numbers capable of storing numbers to very high degree of precision. Categories of constant are also given as.

1. INTEGER CONSTANTS

(a) Decimal: It comprises of one or more decimal digits (0-a). Range of decimal constant is —32, 768 to + 32, 767
(b) Hexadecimal: It Consist of one or more of hexadecimal numbers (0-9, A-F)
(c) Octal: It consist of one or more octal digits (0-7).

2. LONG INTEGER:

These Constant are also whole numbers like integers; it ranges from —2, 147 483, 647 to +2, 147, 483, 647.
3. Fixed Point Constant: They are Positive or negative real numbers e.g. 52.67, -5.09 etc.
4. Floating Point Constants: They are Positive or negative real number represented in exponential form. E.g. 4.36 x 10107, 2.76 x 1025 etc

Leave a Comment

not allowed!