Ch.3 Flashcards
1
Q
integer
A
Whole number
2
Q
real
A
Real numbers
3
Q
char
A
Characters
4
Q
string
A
A sequence of characters,up to 255 characters
5
Q
boolean
A
Logical value(TRUE or FALSE)
6
Q
:
A
Declarations of a variable
var 〈variable〉:〈data type〉
7
Q
=
A
Declaration of a constant
(Also used for comparing two values.)
const 〈constant name 〉= 〈value〉;
8
Q
:=
A
Assignment of a value to a variable
〈variable〉 :=〈value〉 ;
9
Q
Are spaces allowed in names?
A
No
10
Q
div
A
Integer division
e.g. a := 17 div 3;
a=5
11
Q
mod
A
Modulo (remainder)
e.g. a := 17 mod 3;
a=2
12
Q
What is the difference between variable and constant?
A
Constants can’t be changed which the value are assigned to them while variables can be assigned in the later stage .