Readline <CR> behavior

Hi,
when I execute the code below, the input does not end up in the correct variables.
It needs more returns than expected to finish, everthing appears shifted by one or more returns.
(HackerRank challenges depend on console input)

println("enter integer i <CR> decimal d <CR> string s <CR>")
i = readline();
d = readline();
s = readline();
println("done")

I put this code in a file a.jl, then in Julia I run include("a.jl"). This is what I get in the REPL:

julia> include("a.jl")
enter integer i <CR> decimal d <CR> string s <CR>
1 # I wrote this and pressed Enter
2.3 # I wrote this and pressed Enter
hello # I wrote this and pressed Enter
done

Then I have the string "1" in the variable i, etc. Is this not what you expect?

Thx, your way the code is working as expected.

I have the code in a file scratch.jl in VScode and press the triangle.
Then

julia> 

enter integer i <CR> decimal d <CR> string s <CR>
julia> 1
1.1
"toto"

done

julia> 1

julia> i
"1.1"

julia> d
"\"toto\""

julia> s
""

Where does the difference come from? Can this be aligned?

Don’t use readline() (or other stdin methods) together with inline evaluation in VS Code, it’s known to be broken.