Lecture 1.8 - Subtypes of Basic Datatypes
Lecture 1.8 - Subtypes of Basic Datatypes
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
SeqNo
Range of values is: ?
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
SeqNo
Range of values is:
0,1,2,....,Max
Gender
Values: ?
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean
Gender
Values: M or F
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean
Gender
Values: M or F
Operation Result type
?
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean
Gender
Values: M or F
Operation Result type
= Boolean
String Data Type and its subtypes
Values - any sequence of
String characters
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....
Names
Values: Strings with only
alphabet characters
Operation Result type
= Boolean
Note - Change from video: String made more restrictive and operation added
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....
City
Values: Strings with only
alphabet characters
Operation Result type
= Boolean
Note - Change from video: String made more restrictive and operation added
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....
Words
Values: Strings with
alphanumeric and . , ; : ...
Operation Result type
= Boolean