# Syntax errors at terminal (new installation)

**URL:** https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776
**Category:** New to Julia
**Created:** [April 22, 2023, 5:02am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776 "2023-04-22T05:02:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![rcomm](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@rcomm](https://discourse.julialang.org/u/rcomm)
#### Post date: [April 22, 2023, 5:02am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776/1 "2023-04-22T05:02:29Z")

</div>

I have just installed Julia and VS code on a Win10 Pro platform. New to both Julia & VSC.  
A trial run of a \*.jl program off the Net worked fine. So then I tried to experiment with simple commands at the Terminal. I had assumed that the Terminal would respond to interactive use like the CMD console created by running julia.exe directly. But no, the most trivial commands (eg, a = 6, or A = [1 2; 3 4]) cause a variety of different syntax errors. The \*.jl files still run perfectly. Is this expected?  
If so, where do I read up about the difference between interactive use of the Terminal vs interactive use at the CMD console? Haven’t mastered all the documentation yet …

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [April 22, 2023, 6:11am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776/2 "2023-04-22T06:11:06Z")

</div>

That shouldn’t happen. How are you starting julia and how did you install it? What errors exactly do you get?

---

<div class="post-metadata">

### Author: ![rcomm](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@rcomm](https://discourse.julialang.org/u/rcomm)
#### Post date: [April 22, 2023, 7:01am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776/3 "2023-04-22T07:01:04Z")

</div>

After I installed VS Code, I installed Julia language as an extension that it recognised, from the marketplace search. So then, when I click on a \*.jl file, the Julia editor opens and I edit the \*.jl file, save it and press Run. All standard practice as far as I know. And the results are what I expect from the code.

But here are the results of 2 simple Terminal commands:  
PS D:\3\_progdata\prog\_lang\Julia\> A = [1 2; 3 4]  
At line:1 char:13

- A = [1 2; 3 4]
- 

```
        ~~

```

Unexpected token ‘4]’ in expression or statement.  
At line:1 char:14

- A = [1 2; 3 4]
- 

```
         ~

```

Unexpected token ‘]’ in expression or statement.  
+ CategoryInfo : ParserError: (🙂 , ParentContainsErrorRecordException  
+ FullyQualifiedErrorId : UnexpectedToken

PS D:\3\_progdata\prog\_lang\Julia\> a = 6  
a : The term ‘a’ is not recognized as the name of a cmdlet, function, script file, or operable  
program. Check the spelling of the name, or if a path was included, verify that the path is  
correct and try again.  
At line:1 char:1

- a = 6
- ~
  - CategoryInfo : ObjectNotFound: (a:String) , CommandNotFoundException
  - FullyQualifiedErrorId : CommandNotFoundException

I have uninstalled both Julia and VS Code, removed all their directories, reinstalled them, but no change to these errors.

---

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [April 22, 2023, 7:29am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776/4 "2023-04-22T07:29:05Z")

</div>

`ParentContainsErrorRecordException` seems to be a PowerShell error message, so I’m guessing VSCode is trying to run Julia code in PowerShell and never actually started Julia. I don’t know why that would happen.

---

<div class="post-metadata">

### Author: ![rcomm](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@rcomm](https://discourse.julialang.org/u/rcomm)
#### Post date: [April 22, 2023, 7:46am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776/5 "2023-04-22T07:46:56Z")

</div>

I can’t come back to this for a few days, but if I find out further details I’ll let you know.

By the way, I also have a problem that others have also reported: every time you run a \*.jl file, you see a series of repeats of the same error message in the OUTPUT view:  
“Error: there is no registered task type ‘julia-proc’.”  
As far as I could see, no-one has found the cause for that one either. Both of these are benign in that they don’t affect the execution of \*.jl files.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [April 22, 2023, 8:42am UTC](https://discourse.julialang.org/t/syntax-errors-at-terminal-new-installation/97776/6 "2023-04-22T08:42:51Z")

</div>

> [@rcomm](#):
>
> But here are the results of 2 simple Terminal commands:  
> PS D:\3\_progdata\prog\_lang\Julia\> A = [1 2; 3 4]

If you don’t see the `julia>` prompt, then that particular Terminal window isn’t (yet) running a Julia REPL but an OS shell. So you should start another Julia session (eg by typing the path to the Julia program - see [the installation instructions](https://julialang.org/downloads/platform/#windows) for more information). You can have more than one Terminal, which can be confusing.
