Julia Interactive Command Window
Running the julia
command directly enters the interactive command window:
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.2 (2022-02-06)
_/ |\__'_|_|_|\__'_| | release-1.7/bf53498635 (fork: 461 commits, 259 days)
|__/ |
julia>
To exit the interactive command window, run exit()
or use CTRL-D (simultaneously press the Ctrl key and the d key).
We can also execute a Julia code file, which ends with .jl
.
Here is a file named tutorialpro_test.jl
:
tutorialpro_test.jl File
println("Hello World!")
println("tutorialpro")
println(1+1)
To execute the Julia language code, use the julia tutorialpro_test.jl
command.
Executing the above code outputs:
$ julia tutorialpro_test.jl
Hello World!
tutorialpro
2