Professional Documents
Culture Documents
Statements
A statement is a description of an action or condition. E.g A loop statement directs
program flow to repeat a particular line of code or block of code. Key words such as
READ, WRITE, DO, WHILE, FOR, and NEXT are some examples of instructions within
the program.
Variables
A variable is a name that represents the documents a piece of data that can take
many possible values. If the variable is used in the entire program which is called a
global variable. If it is used in one pat of the program it is called a local variable.
E.g. num_1, num_2, value_1, value_2.
Data types
Data type
Description
Examples
Integer
Real
15.7, 8.9
Character
Letters, punctations
A, b, ?, ,
String
Boolean
Yes/No
Program Structure
Nearly all programs share a similar overall structure:
Variable declaration
Program statements (blocks of codes)
Program Cxc;
BEGIN
Writeln (Hello World);
END.