Day 9: Input/Output
Your code won’t be terribly interesting without ways of getting data in and out. Ways to do that with Julia will be the subject of today’s post.
Console IO
Direct output to the Julia terminal is done via print()
and println()
, where the latter appends a newline to the output.
julia> print(3, " blind "); print("mice!\n")
3 blind mice!
julia> println("Hello World!")
Hello World!
Terminal input is something that I never do, but it’s certainly possible. readline()
will read keyboard input until the first newline.