Introspection: Difference between revisions
Content deleted Content added
Added Kotlin |
|||
Line 905: | Line 905: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
{{works with|Julia|0.6}} |
|||
<lang Julia>julia> VERSION |
|||
v"0.3.2" |
|||
julia> VERSION |
<lang julia>@show VERSION |
||
VERSION < v"0.4" && exit(1) |
|||
true</lang> |
|||
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}}== |
=={{header|Kotlin}}== |