Printer Friendly
The Free Dictionary
1,036,292,076 visitors served.
?
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

explicit type conversion

   Also found in: Wikipedia 0.02 sec.
(programming)explicit type conversion - (Or "cast" in C and elsewhere). A programming construct (syntax) to specify that an expression's value should be converted to a different type.

For example, in C, to convert an integer (usually 32 bits) to a char (usually 8 bits) we might write:

int i = 42; char *p = &buf; *p = (char) i;

The expression "(char)" (called a "cast") converts i's value to char type. Casts (including this one) are often not strictly necessary, due to automatic coercions performed by the compiler, but can be used to make the conversion obvious and to avoid warning messages.

?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2008 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.. Terms of Use.