3.1.1 User Defined Data Types


                                                User Defined Data Types

A user-defined data type (UDT) is a data type that derived from an existing data type. You can use UDTs to extend the built-in types already available and create your own customized data types.


Non composite Data Type : Single data type not involving reference to any other data type 
       Now please note that first four are non composite and in built data types whereas pointer and enumerated data types are non composite and user defined data types
  1. * Integer  ( Whole numbers )
  2. * Real ( Decimal Numbers )
  3. * String (Alphanumeric Data )
  4. * Boolean ( True/False )
  5. * Pointer ( Number used to reference a memory location )
  6. * Enumerated ( A list of possible data values )
Enumerated 
Pseudocode : TYPE
                             DECLARE Alphabets : ( "A", "B", "C" )
                             DECLARE Num : 1...5000
                        ENDTYPE
 || THE non-composite data type used in the Alphabets and Num declarations is ENUMERATED.

Composite Data Type: Data type constructed from other data types
  1. * Set ( Collection of finite number of items with no order )  
  2. * Record ( Collection of related items of different data types )
  3. * Class ( Blueprint from which objects are made , Gives properties and methods for objects ) 

0 Comments