Data Types In Programming Languages
Data type is a set of object and a set of operation on those object which create, Build up, destroy, modify and pick apart instances of the objects.or
A data object is a class of data objects together with a set of operations for creating and manipulating them.
A programming languages necessary deals more commonly with data types such as the class of arrays, integers, or file and the operations provided for manipulating, arrays, integers, or files.Example:
In LISP major data type is the binary tree(called an S- expression) and basic operations are CAR,CDR and CONS.
Fortran 77- integer, real, logical, character, double precision, complex
ALGOL- integer, real, boolean
PASCAL- integer, real, boolean, char
Ada- integer, float,Boolean, character
The basic Elements of a Specification of a data types
Attributes- distinguish data object of that types .
Values- that data object of that type mein have.
Operations- manipulations of data object of that type.
Example: Array data type
• Numbers of dimensions
• The subscript range for each dimension and
• The data type of components.
• It would be sets of numbers that form valid values for array components.
• It may include subscripting to select individual array components
• create arrays.
• change their shape
• performing arithmetic on pairs of arrays.
The basic elements of the implementation of a Data Types:
1) Storage Representation: It is used to represent the data objects of the data type in the storage of the computer during program execution.
2) Algorithm or Procedures: The manner in which the operations defined for the data type are represented in terms of particular algorithms or procedures that manipulate the chosen storage representation of the data objects.