SS 2 WEEK FOUR LESSON NOTE (ICT_323)

 

Ss2

TOPIC: BASIC Programming Language

Introduction  

BASIC is an acronym for Beginner’s All-purpose Symbolic Instruction Code. It is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use.

Basic Character

A character is any letter, digit, punctuation, symbol or any other sign used in the presentation of information in any language. BASIC has the following character set.

Alphabets A,B,C………Z

Numeric 0,1,2,3………9

Caret (exponentiation) ^

Asterisk (multiplication) *

Slash (division operation) /

 Minus (subtraction) –

Plus (addition) +

Dollar Symbol (string) $

Ampersand &

Basic fundamentals

The two fundamentals of BASIC programing language are constant and variable.

Constant: constants are static value the BASIC interpreter uses during program execution. There are two types of constants, which are:

1.     String constants:  a string constant is a sequence of 0 - 255   alphanumeric characters enclosed in a double quotation mark. For example, “TOLULOPE”, “TONAD PUBLICATION”.

2.     Numeric constant: numeric constantans can be positive or negative. For instance, if the number 50,200 were to entered as a constant, it would be typed as 50200.

BASIC operators

Symbol operator

Meaning

Example

+

Addition

A+B

-

Subtraction

A-B

*

Multiplication

A*B

/

Division

A/B

^ (or **)

Exponentiation

A^B or (A**B)

  BASIC Language statement

The general format of BASIC statements is:

Xxx   Reserved Word     Parameter

Where

Xxx is the line number; Reserved word is the statement (instruction) type; and parameters are the variables used in conjunction with the statement type.

Classification of BASIC programming statements

a.     Remark statement e.g. REM

b.     Information entry statement e.g. INPUT, READ-DATA.

c.      Data manipulation statement e.g. LET

d.     Output statement e.g. PRINT

e.     Loop statement e.g. FOR….NEXT,  WHILE…… NEXT.

f.       Control statement e.g. GOTO, IF-THEN, GOSUB.

g.     Program termination statement e.g. END, STOP.

Comments

Popular posts from this blog

JSS 2 WEEK TWO LESSON NOTE_FIRST TERM 2023

SSS TWO WEEK TWO LESSON NOTE (ICT_223)

JSS ONE WEEK THREE LESSON NOTE (ICT_223)