How to create a default value for inputs in a function

kentz
✭
in RobotStudio
I want to achieve something like proc main(a, b, c, d), where input c and d get hardly changed. Is there a default value that i can set to c and d when i can just go main a,b; ?
and when i do want to change c and d value i'll go main a, b, c,d;
Regards
Kent
0
Best Answer
-
Yes, they'd be optional arguments.
See how the wobj argument is checked for presence, then only used if present in Example 1:
http://developercenter.robotstudio.com/BlobProxy/manuals/RapidIFDTechRefManual/doc369.html
5
Answers
-
soup said:Yes, they'd be optional arguments.
See how the wobj argument is checked for presence, then only used if present in Example 1:
http://developercenter.robotstudio.com/BlobProxy/manuals/RapidIFDTechRefManual/doc369.html0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 336 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 828 RAPID Programming
- 12 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings