# "switch" optional parameters

**URL:** <https://tech-community.robotics.abb.com/t/switch-optional-parameters/6956>\
**Category:** RAPID Programming\
**Created:** [January 15, 2016, 6:12am UTC](https://tech-community.robotics.abb.com/t/switch-optional-parameters/6956 "2016-01-15T06:12:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobTech](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/robtech/32/2443_2.png) [@RobTech](https://tech-community.robotics.abb.com/u/RobTech)\
**Post date:** [January 15, 2016, 6:12am UTC](https://tech-community.robotics.abb.com/t/switch-optional-parameters/6956/1 "2016-01-15T06:12:41Z")

</div>

hello everyone, i am looking for someone to help me with a Rapid program i’m working on. I am using a switch datatype which allows for optional parameter to be on or off. but in my case i’m having trouble with making it work. it says that my proc is an invalid entrypoint saying the reason is because its either local or has parameters but i understand that it has parameters. i am needing these parameters to make my program run the way that I’m needing. is if someone could help it would be most appreciated.

---

<div class="post-metadata">

**Author:** ![Pavel\_Riabichev](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@Pavel\_Riabichev](https://tech-community.robotics.abb.com/u/Pavel_Riabichev)\
**Post date:** [January 15, 2016, 6:20am UTC](https://tech-community.robotics.abb.com/t/switch-optional-parameters/6956/2 "2016-01-15T06:20:09Z")

</div>

Hello RobTech

Did you try to make another procc (without parameters) the entry point and then call your procc with parameters?  
The entry point is the first thing that will run on startup, so there is nothing before that can set its parameters.

Example:

MODULE PROG  
PERS num parameter;

PROC main() !Entrypoint

proccWithParams parameter;

ENDPROC

PROC proccWithParams(num parameter)

ENDPROC

ENDMODULE

/Pavel
