# Incomplete: premature end of input（about function）

**URL:** <https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 24, 2023, 9:17pm UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793 "2023-06-24T21:17:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanyi](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hanyi](https://discourse.julialang.org/u/Hanyi)\
**Post date:** [June 24, 2023, 9:17pm UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/1 "2023-06-24T21:17:50Z")

</div>

hi guys, i am recently introduced to Julia. I have a problem with " function", I don’t know how to debug this problem. can you help me? Thank you very much!

 ![1687641246425](https://global.discourse-cdn.com/julialang/original/3X/3/e/3e721066a676eac31b942aeb83e603585df0e4d9.png)

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [June 24, 2023, 9:41pm UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/2 "2023-06-24T21:41:34Z")

</div>

I see no problem with your code, are you sure you did not insert a special character in the code?

---

<div class="post-metadata">

**Author:** ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Post date:** [June 24, 2023, 11:42pm UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/3 "2023-06-24T23:42:47Z")

</div>

Is it at all possible that you highlighted line 1 and 2 and then clicked `Ctrl + Enter`? I would expect that error if you accidentally executed just the first two lines.

---

<div class="post-metadata">

**Author:** ![Hanyi](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hanyi](https://discourse.julialang.org/u/Hanyi)\
**Post date:** [June 25, 2023, 8:11am UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/4 "2023-06-25T08:11:38Z")

</div>

Yes, this is the code from GPT. Is there something wrong with installation or package by any chance?  
Do you know how i can check that?

---

<div class="post-metadata">

**Author:** ![Hanyi](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hanyi](https://discourse.julialang.org/u/Hanyi)\
**Post date:** [June 25, 2023, 8:13am UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/5 "2023-06-25T08:13:58Z")

</div>

Thank you so much！！The reason is what you said！Thank you 😊

---

<div class="post-metadata">

**Author:** ![Hanyi](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hanyi](https://discourse.julialang.org/u/Hanyi)\
**Post date:** [June 25, 2023, 8:14am UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/6 "2023-06-25T08:14:35Z")

</div>

Thank you！ 😀

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [June 25, 2023, 1:45pm UTC](https://discourse.julialang.org/t/incomplete-premature-end-of-input-about-function/100793/7 "2023-06-25T13:45:28Z")

</div>

Since nobody else brought it up, it is probably not a good idea to use a variable named sum because that conflicts with the function called sum.
