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.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings