Forgot your password?  

Not What You Meant?  There are 16 definitions for Type.

Coercion of Data Types | Research & Encyclopedia Articles

Print-Friendly   Order the PDF version   Order the RTF version
About 1 pages (285 words)
Data type Summary

 


Coercion of Data Types

Coercion of data types is a technique for converting data from one type to another; its purpose is to make the data compatible with the code executing a command. Data-type coercion is an action usually taken "behind the scenes" by a computer without the user being aware of it. An example of coercion of data types is the conversion from integer (e.g., 2, 79, 563) to floating point (e.g., 2.00, 7.9, .563) or vice versa. Coercion can involve changes as simple as truncation or rounding.

For instance, if input is represented in floating point notation but the output only needs an integer value, then the result will be converted from floating point to integer notation; for example, from "2.00" to "2."

A data type is a special internal code used inside a computer to keep track of the different types of data that it processes. A particular data type is a set of data that specifies (1) the possible range of values of the set, (2) the operations that can be performed on the values, and (3) the way in which the values are stored in computer memory. Data types often include such notations as real (e.g., whole and fractional numbers), integer (e.g., whole numbers), floating point (e.g., a number with a decimal point), character (e.g., readable text), Boolean (e.g., the binary numbers 0 and 1), and pointer (e.g., any mouse-controlled symbol).

Usually, a limited number of data types come built into a computer programming language. Whenever data types are specified, conversion among them is generally allowed. With object-oriented programming a programmer can create new data types to meet application needs. Conversion among the new and old (built-in) data types is also usually allowed.

This is the complete article, containing 285 words (approx. 1 page at 300 words per page).

More Information
  • View Coercion of Data Types Study Pack
  • 16 Alternative Definitions
  • Search Results for "Coercion of Data Types"
  • More Products on This Subject
    Simple Data Types
    Data are simply pieces of information, and an individual piece of information is a datum. Common us... more

    Types
    One of the fundamental issues in programming languages is the "types" of objects or data primitives... more


    Ask any question on Data type and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Coercion of Data Types from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags

    Join BookRagslearn moreJoin BookRags