# Elseif, ellse, why read(stdin,Char) not works in Julia 0.7?

**URL:** <https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069>\
**Category:** General Usage\
**Created:** [June 8, 2019, 8:03am UTC](https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069 "2019-06-08T08:03:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [June 8, 2019, 8:03am UTC](https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069/1 "2019-06-08T08:03:09Z")

</div>

Why not works else take() after enter ‘s’ to take()

```julia
function take()
global agreement=read(stdin,Char)
end

take()
s

if agreement=='y' ; 
elseif agreement=='n' ; 
else take()
end

```

---

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [June 8, 2019, 10:57am UTC](https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069/2 "2019-06-08T10:57:57Z")

</div>

> [@programista](#):
>
> if agreement==‘y’ ; elseif agreement==‘n’ ; else take() end

Works for me

```julia
Starting Julia...
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _ | |
  | | |_| | | | (_| | | Version 1.1.1 (2019-05-16)
 _/ |\ ___|_|_|\__ _| | Official https://julialang.org/ release
|__/ |

julia> function take()
       println("Now inside function take()")
       global agreement=read(stdin,Char)
       end
take (generic function with 1 method)

julia> take()
Now inside function take()
s
's': ASCII/Unicode U+0073 (category Ll: Letter, lowercase)

julia> if agreement=='y' ; 
              elseif agreement=='n' ; 
              else take()
              end
Now inside function take()
g
'g': ASCII/Unicode U+0067 (category Ll: Letter, lowercase)

```

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 8, 2019, 11:13am UTC](https://discourse.julialang.org/t/elseif-ellse-why-read-stdin-char-not-works-in-julia-0-7/25069/3 "2019-06-08T11:13:45Z")

</div>

[https://github.com/JunoLab/Juno.jl/issues/118](https://github.com/JunoLab/Juno.jl/issues/118)
