The @showln macro was not merged because Tim closed it because nobody 
commented positively for a week. We try to limit the number of exports in 
Julia Base, and we try to not have too many related concepts to do almost 
the same thing. I don't have a strong opinion on this, but Stefan's 
suggestion to incorporate the file an line info in the output of @show 
seems reasonable to me.

The good news is that you can use the macro if you put

function show_backtrace1(bt)
for t in bt
    lkup = ccall(:jl_lookup_code_address, Any, (Ptr{Void}, Int32), t, 0)
    if lkup != ()
        fname, file, line = lkup
            print("in ", fname, " at ", file, ", line ", line)
            break
        end
    end
end

macro showln(exs...)
    :(bt = backtrace(); @show $(esc(exs...)); print(" ("); 
show_backtrace1(bt); println(")"))
end

At the top of your source file.

kl. 11:38:42 UTC+2 torsdag 7. august 2014 skrev [email protected] følgende:
>
> This is great,
> just what i am looking for.
>
> But when i try to use it, it says
> ERROR: @showln not defined
>
> i use the newest julia version,
> i tryed different types of importing this macro...
>
> any idea?
>
>
> thanks
> -Matthias
>

Reply via email to