43

I installed Julia studio 0.4.4, and found it does not support multi-line comments #=...=# so I wanted to find what version of Julia it is running.

In Matlab one types the command ver which not only shows the version number of matlab, but also the version numbers of all toolboxes installed.

I googled for sometime, but not able to find similar command for Julia. Is there such a command for Julia?

julia> Version
ErrorException("Version not defined")
julia> ver
ErrorException("ver not defined")
julia> ver()
ErrorException("ver not defined")
julia> Version()
ErrorException("Version not defined")
Steve H
  • 879
  • 4
  • 13
  • 18

3 Answers3

51

Just entering out the constant VERSION would also display the version number.

julia> VERSION
v"0.4.0"
Dawny33
  • 10,543
  • 21
  • 82
  • 134
  • 1
    One related usage of this variable to make a section of code for a specific version or range of versions: `@static if VERSION >= v"0.7" ....... end` – phyatt Feb 20 '19 at 18:29
41

Use the versioninfo command:

From the documentation:

versioninfo([verbose::Bool])

    Print information about the version of Julia in use. If the verbose argument 
    is true, detailed system information is shown as well.
LukStorms
  • 28,916
  • 5
  • 31
  • 45
damienfrancois
  • 52,978
  • 9
  • 96
  • 110
4

If you are using windows,you can use julia -version of the cmd command

HT.haung
  • 41
  • 4