# Failed to execute multi-line commands at the ROOT prompt

**URL:** <https://root-forum.cern.ch/t/failed-to-execute-multi-line-commands-at-the-root-prompt/59477>\
**Category:** Newbie\
**Created:** [May 27, 2024, 10:24am UTC](https://root-forum.cern.ch/t/failed-to-execute-multi-line-commands-at-the-root-prompt/59477 "2024-05-27T10:24:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Closedbook](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/closedbook/32/36641_2.png) [@Closedbook](https://root-forum.cern.ch/u/Closedbook)\
**Post date:** [May 27, 2024, 10:24am UTC](https://root-forum.cern.ch/t/failed-to-execute-multi-line-commands-at-the-root-prompt/59477/1 "2024-05-27T10:24:48Z")

</div>

Well, I learnd root by " First steps with ROOT" in Manaul. When I try the example like this:

```auto
root [0] {
root [1] int j = 0;
root [2] for (int i = 0; i < 3; i++)
root [3] {
root [4] j = j + i;
root [5] std::cout << "i = " << i << ", j = " << j << std::endl;
root [6] }
root [7] }
i = 0, j = 0
i = 1, j = 1
i = 2, j = 3

```

after the first line, I got a wrong:

```auto
{
root (cont'ed, cancel with .@)

```

I dont know whats wrong with it, may someone help me.  
The ROOT version is ROOT 6.30/06. The platform is Ubuntu20.04LTS and Compiler is C++

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [May 27, 2024, 10:40am UTC](https://root-forum.cern.ch/t/failed-to-execute-multi-line-commands-at-the-root-prompt/59477/2 "2024-05-27T10:40:32Z")

</div>

That’s not an error, it’s just telling you that you can continue typing lines, or type .@ (and enter) to cancel this “multiline environment”. So, continue entering the commands, and after the last line (the } in your case) ROOT will (try to) execute the code.

---

<div class="post-metadata">

**Author:** ![Closedbook](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/closedbook/32/36641_2.png) [@Closedbook](https://root-forum.cern.ch/u/Closedbook)\
**Post date:** [May 27, 2024, 11:18am UTC](https://root-forum.cern.ch/t/failed-to-execute-multi-line-commands-at-the-root-prompt/59477/3 "2024-05-27T11:18:50Z")

</div>

oh!!!Thank you！  
I am foolish, 😂I mistake it means “cantend”

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 27, 2024, 11:31am UTC](https://root-forum.cern.ch/t/failed-to-execute-multi-line-commands-at-the-root-prompt/59477/4 "2024-05-27T11:31:34Z")

</div>

Any way it is true that what is shown in the manual is not conform to what you get when you enter manually some code. I made this PR [update 1st step example by couet · Pull Request #996 · root-project/web · GitHub](https://github.com/root-project/web/pull/996) to make it more confrom to what you get.
