test_julia_scripts/TypeHierarchiesMultiple.jl

12 lines
415 B
Julia
Raw Normal View History

2020-05-07 17:05:12 +00:00
telltype(x) = "Unknown Type"
telltype(x::Integer) = "Integer Type"
telltype(::AbstractFloat) = "Floatingpoint Type"
telltype(::Int64) = "64 Bytes Integer"
counargs(a) = "one"
counargs(a,b) = "two"
counargs(a,b,c) = "three"
foo(a,b) = "Two variables"
foo(a::Integer,b::Integer) = "Two integers"
foo(a::Integer,b::AbstractFloat) = "An integer and a float"
foo(a::AbstractFloat,b::Integer) = "An float and an integer"