Implicit type conversion: Difference between revisions
Content added Content deleted
Line 655: | Line 655: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
In general, Julia will promote a smaller sized datatype to a larger one when needed for a calculation involving mixed |
In general, Julia will promote a smaller sized datatype to a larger one when needed for a calculation involving mixed data types. Julia also accepts type annotations on variable declarations as shown below, though such type declarations are usually only allowed for variables that are declared within a function. |
||
<lang julia> |
<lang julia> |
||
julia> function testme() |
julia> function testme() |