Anonymous user
Introspection: Difference between revisions
→{{header|Julia}}
(Added Kotlin) |
|||
Line 905:
=={{header|Julia}}==
{{works with|Julia|0.6}}
<lang julia>@show VERSION
VERSION < v"0.4" && exit(1)
if isdefined(:bloop) && !isempty(methods(abs))
@show abs(bloop)
end
a, b, c = 1, 2, 3
vars = filter(x -> eval(x) isa Integer, names(Main))
println("Integer variables: ", join(vars, ", "), ".")
println("Sum of integers in the global scope: ", sum(eval.(vars)), ".")</lang>
{{out}}
<pre>VERSION = v"0.6.2"
Integer variables: a, b, c.
Sum of integers in the global scope: 6.</pre>
=={{header|Kotlin}}==
|