# To get documentation for a command

**URL:** https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808
**Category:** New to Julia
**Created:** [June 20, 2018, 6:05am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808 "2018-06-20T06:05:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)
#### Post date: [June 20, 2018, 6:05am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808/1 "2018-06-20T06:05:56Z")

</div>

I tried  
?println  
as mentioned [here](https://github.com/xorJane/Introduction_to_Julia_tutorials/blob/master/%201.%20Getting%20started.ipynb).  
I am getting an error as “UndefVarError: ? not defined”

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [June 20, 2018, 6:42am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808/2 "2018-06-20T06:42:35Z")

</div>

Where did you try this? Can you copy-paste your input and output? This is what I get in the Julia REPL:

```julia
help?> println
search: println printstyled print_with_color print print_shortest sprint isprint

  println([io::IO], xs...)

  Print (using print) xs followed by a newline. If io is not supplied, prints to stdout.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> println("Hello, world")
  Hello, world
  
  julia> io = IOBuffer();
  
  julia> println(io, "Hello, world")
  
  julia> String(take!(io))
  "Hello, world\n"

```

---

<div class="post-metadata">

### Author: ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)
#### Post date: [July 8, 2018, 12:57am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808/3 "2018-07-08T00:57:06Z")

</div>

Hi, thanks for the reply. I had tried it on IJulia

```julia
?println

```

Result

> UndefVarError: ? not defined

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [July 8, 2018, 1:56am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808/4 "2018-07-08T01:56:11Z")

</div>

That should work in the Jupyter notebook. Can you provide a screenshot?

---

<div class="post-metadata">

### Author: ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)
#### Post date: [July 8, 2018, 2:14am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808/5 "2018-07-08T02:14:11Z")

</div>

Hi thanks for the reply.

![Selection_001](https://global.discourse-cdn.com/julialang/original/3X/4/1/4136f1d180691909e28b9d64f5298c9da8e25dc0.jpeg)

Can check [here](https://github.com/SubhankarGhosh/Julia-Tutorials/blob/master/Introduction%20to%20Julia(Jane%20Herriman)/1.%20Getting%20started.ipynb) as well.

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [July 8, 2018, 3:11am UTC](https://discourse.julialang.org/t/to-get-documentation-for-a-command/11808/6 "2018-07-08T03:11:17Z")

</div>

Ah, yeah, I can reproduce that. Removing the first line (the `#To get docs` comment) fixes the issue. To use the help lookup, the `?` character needs to be the very first thing in the cell.

You can get the same problem at the REPL:

```julia
julia> # This is a comment
       ?println
ERROR: UndefVarError: ? not defined

```

(note that I had to press alt-enter after the comment line to get a new line without executing anything)
