# Can not call a procedure with more than one argument

**URL:** <https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746>\
**Category:** RobotStudio\
**Created:** [August 5, 2015, 11:56am UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746 "2015-08-05T11:56:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gene](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Gene](https://tech-community.robotics.abb.com/u/Gene)\
**Post date:** [August 5, 2015, 11:56am UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/1 "2015-08-05T11:56:31Z")

</div>

Hello guys,  
everytime when i try in rapid to call a procedure with more than one argument, the compiler tells me there is a syntax error and expects a bracket.

Simple Example:

```auto
 PROC test (var num a, var num b) VAR num c; c:=a; a:=b; b:=c; ENDPROC 
```

calling in main doesent work because of syntax error: ` var num a:=3; var num a:=4; test(a,b); `

What do I overlook? What syntax error? How to fix it? The procedure is declared out of the main procedure in module. Thnx.

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [August 6, 2015, 6:23am UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/2 "2015-08-06T06:23:58Z")

</div>

If you call a proc the call is test a,b and if you call a func it’s test(a,b) could be the issue

---

<div class="post-metadata">

**Author:** ![Gene](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Gene](https://tech-community.robotics.abb.com/u/Gene)\
**Post date:** [August 11, 2015, 7:03am UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/3 "2015-08-11T07:03:07Z")

</div>

Hi Per,  
thnx for your tip, but your instruction doesnt work. The manual example is more similar to my procedure example. I also tried to call a funciton (FUNC) but the same problem. Compiler says syntax error. The only way I see now, is to use global variables. But it doesnt solve my problem.

---

<div class="post-metadata">

**Author:** ![Knud\_E\_Lindberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/knud_e_lindberg/32/4450_2.png) [@Knud\_E\_Lindberg](https://tech-community.robotics.abb.com/u/Knud_E_Lindberg)\
**Post date:** [August 11, 2015, 1:12pm UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/4 "2015-08-11T13:12:47Z")

</div>

You can not use the name test it is a rapid command

---

<div class="post-metadata">

**Author:** ![Gene](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Gene](https://tech-community.robotics.abb.com/u/Gene)\
**Post date:** [August 12, 2015, 7:19am UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/5 "2015-08-12T07:19:53Z")

</div>

Hi Knud, yes I know. Its only a code example. My procedures had other names and they weren’t underlined by the compiler, instead the instruction for calling the procedure was marked as a syntax error. I dont know why.

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [August 12, 2015, 2:24pm UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/6 "2015-08-12T14:24:13Z")

</div>

Is something like this

 ![Capture.PNG](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/1X/7e863f7747c11b29100baf32412cf45f6f665def.png)

---

<div class="post-metadata">

**Author:** ![Gene](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Gene](https://tech-community.robotics.abb.com/u/Gene)\
**Post date:** [August 20, 2015, 9:38am UTC](https://tech-community.robotics.abb.com/t/can-not-call-a-procedure-with-more-than-one-argument/6746/7 "2015-08-20T09:38:29Z")

</div>

Hi Per, thnx. The brackets had to be missing. So you was right.
