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.

Programming_Language

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.

Elements_of_specification_of_data_types

Example: Array data type

Attribute:-

• Numbers of dimensions

• The subscript range for each dimension and

• The data type of components.

Value:

• It would be sets of numbers that form valid values for array components.

Operations-

• 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.

10- Data Type- Programming Languages- Programming Languages




    CLICK HERE TO Download This PDF NOTES




Facebook Likes

Youtube