Implicit type conversion: Difference between revisions
Content added Content deleted
m (C++) |
(Cleaned up task wording) |
||
Line 8: | Line 8: | ||
;Task: |
;Task: |
||
Demonstrate |
Demonstrate various type conversions and give an example of an ''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 |
In strongly 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. Give an example if your language does this. |
||
Languages that don't support ''any'' ''implicit type conversion'' |
Languages that don't support ''any'' ''implicit type conversion'' can be added to the [[:Category:Maintenance/OmitCategoriesCreated|/Omit]] category. |
||
Indicate if |
Indicate if your 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> |
<br><br> |
||