JSS2: COMPUTER STUDIES - 2ND TERM
-
Introduction To Basic Language I | Week 17 Topics|1 Quiz
-
Introduction To Basic Language II | Week 22 Topics|1 Quiz
-
Computer Ethics I | Week 36 Topics|1 Quiz
-
Computer Ethics II | Week 42 Topics|1 Quiz
-
Safety Measures In Computer Environment | Week 53 Topics|1 Quiz
-
Computer Graphics Packages I | Week 63 Topics|1 Quiz
-
Computer Graphic Packages II | Week 76 Topics|1 Quiz
Fundamental Concepts of Basic Language
Topic Content:
- Fundamental Concepts of Basic Language
1. Character Set:
The BASIC character set comprises all the ALPHABETS (A-Z), NUMERIC characters (digits 0-9) and some SPECIAL characters: !@#$%&*()_+-={}[];”,/<>?
2. Constants:
Constants are data elements supplied to BASIC. It could be in the form of Strings or Numeric constants.
A string constant is a sequence of characters enclosed in quotation marks, For example, “All that glitters is not gold”
A numeric constant is a number that can be used in calculations such as integer (whole number – 144), fixed point constant (any positive or negative real number with decimal points – 8.5, -2.0), floating point numeric constant (any positive or negative number represented in exponential form, for example, 75E+2 same as 7500, 75E-2 same as .75)
3. Variables:
A variable is a name that represents a number or string. It is a kind of storage location in your program. A variable for storing a numeric value is called a numeric variable, while that for storing a string value is called a string variable.
A numeric variable name must consist of a letter followed by an integer, for example, X2, C6, B, Q1, Y3. A string variable name consists of a letter followed by a dollar sign, for example, B$, X$, K$, C$. Most versions of BASIC also allow a string variable to be written as a letter followed by an integer, followed by a dollar sign, for example, B2$, X9$, C6$, K5$.