# Weird Missing Left Curly Bracket Error

**URL:** <https://discourse.processing.org/t/weird-missing-left-curly-bracket-error/13303>\
**Category:** Beginners\
**Created:** [August 11, 2019, 12:33am UTC](https://discourse.processing.org/t/weird-missing-left-curly-bracket-error/13303 "2019-08-11T00:33:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![8bit\_coder](https://avatars.discourse-cdn.com/v4/letter/8/c77e96/32.png) [@8bit\_coder](https://discourse.processing.org/u/8bit_coder)\
**Post date:** [August 11, 2019, 12:33am UTC](https://discourse.processing.org/t/weird-missing-left-curly-bracket-error/13303/1 "2019-08-11T00:33:55Z")

</div>

I’m working on a program, and everything compiles and runs fine. But the second that I paste:

```auto
char letter = 'F';

switch(letter) {
  case 'F': 
    println("F");
    break;
  case 'S': 
    println("S");
    break;
}

```

It suddenly throws an error saying  
`Missing left curly bracket, "{"`

right after the `char letter = 'B';`

Even though there is literally no missing curly bracket. Apparently, this solves it:

```auto
char letter = 'F';{

switch(letter) {
  case 'F': 
    println("F");
    break;
  case 'S': 
    println("S");
    break;}
}

```

I have literally no idea how there was a missing curly bracket in the first place and why placing those two curly brackets fixes the error and the program compiles fine.  
Anyone able to help? Thanks

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [August 11, 2019, 1:29am UTC](https://discourse.processing.org/t/weird-missing-left-curly-bracket-error/13303/2 "2019-08-11T01:29:31Z")

</div>

i tested both of your code here ( processing IDE 3.5.3 )  
and both OK.

there is some nice help:

++ readability  
please use  
[ctrl][t]  
to format your code

++ block indication  
please position your cursor behind the ‘{’  
and the editor shows you its related ending ‘}’ like with ‘[}]’

---

<div class="post-metadata">

**Author:** ![8bit\_coder](https://avatars.discourse-cdn.com/v4/letter/8/c77e96/32.png) [@8bit\_coder](https://discourse.processing.org/u/8bit_coder)\
**Post date:** [August 11, 2019, 1:30am UTC](https://discourse.processing.org/t/weird-missing-left-curly-bracket-error/13303/3 "2019-08-11T01:30:56Z")

</div>

Oh I’m using 3.3.7, that makes sense. I guess I’ll have to update. Also thanks for the tips!
