Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

explicit type conversion

You are here: irt.org | FOLDOC | explicit type conversion

<programming> (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.


Nearby terms: expert system « Expert Systems Ltd. « explicit parallelism « explicit type conversion » exploit » Exploratory Data Analysis » exponent

FOLDOC, Topics, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ?, ALL

©2018 Martin Webb