I’m trying to print a prompt, then leave the cursor on the same line for user input. But when I execute println("> ") the cursor moves to the next line. How can I do this?
The “ln” in
println indicates the newline.
You can try with only
I want the newline before the prompt, it’s the newline after the prompt that aI want to suppress.
Thanks for the response.
Thanks for the suggestion. I just tried that and it still goes to the next line after the prompt.
Just using print works, thanks!
You may want to look at
julia> msg = Base.prompt("Type something"); Type something: Hello! julia> msg "Hello!"
Thanks for the suggestion.