# Ask for help for the "expecting EOF, found 'for"

**URL:** <https://discourse.processing.org/t/ask-for-help-for-the-expecting-eof-found-for/14362>\
**Category:** Community\
**Created:** [October 2, 2019, 3:08am UTC](https://discourse.processing.org/t/ask-for-help-for-the-expecting-eof-found-for/14362 "2019-10-02T03:08:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chengch](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@chengch](https://discourse.processing.org/u/chengch)\
**Post date:** [October 2, 2019, 3:08am UTC](https://discourse.processing.org/t/ask-for-help-for-the-expecting-eof-found-for/14362/1 "2019-10-02T03:08:42Z")

</div>

Dear ALL: I just type the following simple code, and shown the error message of

> “expecting EOF, found 'for”

can some one give me the guidence of this problem, thanks a lot

* * *

```auto
void setup(){
  size(200, 200);
  noStroke();
  background(255);
  fill(0, 102, 153, 204);
  smooth(); noLoop();
}

void draw(){
  circles(40, 80);
  circles(90, 70);
}

void circles(int x, int y) {
  ellipse(x, y, 50, 50);
  ellipse(x+20, y+20, 60, 60);
}

for (int i = 0; i < 80; i = i+5) {
  line(30, i, 80, i);
}

```

---

<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:** [October 2, 2019, 3:23am UTC](https://discourse.processing.org/t/ask-for-help-for-the-expecting-eof-found-for/14362/2 "2019-10-02T03:23:49Z")

</div>

{ } is to group code  
and the PDE editor helps you to find the begin and end !  
position your cursor behind a { and you see the corresponding } as [}]

* * *

also to see the code structure better use the  
[ctrl][t] autoformat

* * *

and to post the code here at the forum  
use the  
`</> Preformatted text` button of the forum editor header menu

* * *

your last for loop is not inside any function, and that confuses the ?precompiler?

in that version you see something

```auto
void setup() {
  size(200, 200);
  //noStroke();
  background(255);
  fill(0, 102, 153, 204);
  smooth(); 
  noLoop();
}

void draw() {
  circles(40, 80);
  circles(90, 70);
  lines();
}

void circles(int x, int y) {
  ellipse(x, y, 50, 50);
  ellipse(x+20, y+20, 60, 60);
}

void lines() {
  for (int i = 0; i < 80; i = i+5) {
    line(30, i, 80, i);
  }
}

```

possibly not what you wanted but now you can start from here.
