Implicit type conversion: Difference between revisions

Cleaned up task wording
m (C++)
(Cleaned up task wording)
Line 8:
 
;Task:
Demonstrate the various type conversions in each language, and give an example of aan ''implicit type conversion'' path from the smallest possible variable size to the largest possible variable size. (Where the size of the underlying variable's data strictly increases).
 
In strongstrongly typed languages ''some'' types are actually mutually incompatible. In this case the language may have disjoint type conversion paths, or even branching type conversion paths. (WhereGive itan occursexample inif a specificyour language, itdoes is demonstrated in the code samples belowthis.)
 
Languages that don't support ''any'' ''implicit type conversion'' arecan detailedbe inadded to the [[:Category:Maintenance/OmitCategoriesCreated|/Omit]] categories at the bottom of this pagecategory.
 
Indicate if theyour language supports ''user defined'' type conversion definitions and give an example of such a definition.   (E.g. define an ''implicit type conversion'' from '''real''' to '''complex''' numbers, or from '''char''' to an array of '''char''' of length 1.)
 
And give an example of such a definition.   (E.g. define an ''implicit type conversion'' from '''real''' to '''complex''' numbers, or from '''char''' to an array of '''char''' of length 1.)
<br><br>
 
125

edits