Special Data Type
Lab: Types of Data
Video Runtime: 03:30
Special data types are specified by the programming language. One example is the enumeration. Let’s explore this data type.
Your key takeaways are:
- Special data types are specified by the programming language
- Enumeration is a common data type
- It is an example of using the right tool for the job
Study Notes
It’s a data type specific to a particular language. One fairly common data type is an enumeration.
Examples of Enumeration
enum Month (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC);
enum Season (SPRING, SUMMER, FALL, WINTER);
enum Users (SUBSCRIBER, CONTRIBUTOR, AUTHOR, EDITOR, ADMIN, SUPERADMIN);
enum Month (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
enum Season (0, 1, 2, 3);
enum Users (0, 1, 2, 3, 4, 5);
- Maps a number to a string representation
- You use the representation in your code
- Performant
- Specifically designed for this purpose
- Less memory
Languages with Enumeration
- C
- Python
- Pascal
- C#
- Visual Basic
- Java
- SQL
You will grow in this profession when you incrementally and systematically stretch yourself....bit-by-bit.
Episodes
Total Lab Runtime: 00:48:33
- 1 Lab Introductionfree 05:36
- 2 Primitive Data Typefree 08:58
- 3 Composite Data Typefree 19:19
- 4 Special Data Typefree 03:30
- 5 Abstract Data Typefree 11:10