-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UndefVarError: @showln not defined #2
Comments
I should have explicitly said you need to have |
@timholy I had that (Ps: I would have thought its obvious :-) ) and it still didnt work, so I am not sure what is wrong. |
To someone as knowledgeable as yourself, I also assumed that would have been obvious, but I couldn't imagine what else might have explained an So let's back up: if you do a |
Hah, you flatter me needlessly :). Anyway, I pulled the latest master and tried it with a clean repo and while the Additionally, I noticed that calling an array sets keyword @showln push! returns |
It only prints the value, it shouldn't return it (that function returns I see though, that the built-in show returns a value. However, it's a little weird: julia> x = 3
3
julia> y = 5
5
julia> z = @show x y
x = 3
y = 5
5
julia> z
5
julia> z = @show y x
y = 5
x = 3
3
julia> z
3 So it returns the last value. Also: julia> @show push!
push! = push!
push! (generic function with 15 methods) In other words, this is supposed to work the same way |
On Wed, Apr 13, 2016 at 6:20 PM, Tim Holy notifications@github.com wrote:
Oops, I meant it didnt print** anything on the screen. ** used 'return' as a colloquial word that refers to showing the
Besides the last value, it also reassigns (for lack of a better term)
Yes, that would be useful but in the example cited in the README didnt SVAKSHA ॥ http://about.me/svaksha ॥ |
By "run the file", did you do this? julia> include("/tmp/showln_test.jl")
foo (generic function with 1 method)
julia> foo()
x = 5
(in foo at ./error.jl:26 at /tmp/showln_test.jl:5)
x = 7
(in foo at ./error.jl:26 at /tmp/showln_test.jl:7)
julia> Notice you only get output when you call If you don't see any output printed, does that change if you change julia> include("/tmp/showln_test.jl")
foo (generic function with 1 method)
julia> foo()
x = 5
x = 7
julia> If you don't see that, then there's something weird about your julia installation. |
Hi @timholy Changing it to |
Returning the last-evaluated expression was implemented in 5f20ac4. |
Hi Tim,
I tried the @showln example in the readme and it throws an error :
The errors are on v0.5 and v0.4 (Debian and Opensuse). Can you please explain with another example how your lib walks through the readme sample code?
Thanks in Advance.
The text was updated successfully, but these errors were encountered: