Skip to content

Commit 81d34c5

Browse files
pdeffebachKristoffer Carlssonmbauman
authored
Update @isdefined to have clearer examples (#36663)
Co-authored-by: Kristoffer Carlsson <kricarl@student.chalmers.se> Co-authored-by: Matt Bauman <mbauman@juliacomputing.com>
1 parent 94398d1 commit 81d34c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

base/reflection.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,15 @@ See also [`isdefined`](@ref).
249249
250250
# Examples
251251
```jldoctest
252+
julia> @isdefined newvar
253+
false
254+
255+
julia> newvar = 1
256+
1
257+
258+
julia> @isdefined newvar
259+
true
260+
252261
julia> function f()
253262
println(@isdefined x)
254263
x = 3

0 commit comments

Comments
 (0)