|
Data
Types
|
Descriptions
|
|
integer
|
- are
whole numbers that can be positive, zero or negative
- no decimal
points, blank spaces or commas between digits
- not all integers
can be represented because of the limitation of memory in the computer
- in Turbo Pascal,
the acceptable range of integers is between 32767 and -32768
- can perform
calculation
|
|
real
|
- numbers
containing decimal points
- no blank spaces
or commas between digits
- can be expressed
in either in decimal notation or in exponential notation for example,
- (i) 125.2
(in decimal notation)
- (ii) 1.252E+02
(in exponential notation)
- real constant
must have at least one digit before and after the decimal point
- can perform
calculation
|
|
boolean
|
- has
two values only : true and false
- used to represented
conditional value and decision-making
|
|
char
|
- can
be a letter, a numeric digit, a punctuation symbol or a special
symbol
- one of the
symbol in ASCII character set
- consists of
a single character enclosed within a pair of single quotation marks
e.g. 'A', '8', '+'
- if the character
is an apostrophe ( ' ), it must appear as a pair of apostrophes
enclosed within a pair of single quotation marks i.e. ' " '
- cannot perform
calculation directly
|
|
string
|
- a
sequence of zero or more (up to 255) characters enclosed in a pair
of single quotation marks
- null string
contains no character
- cannot perform
calculation directly
|