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
- 
            
Thank you soup, that's exactly all i need. And you've just pointed me to a awesome place for programming references.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
 - 401 UpFeed
 - 21 Tutorials
 - 15 RobotApps
 - 306 PowerPacs
 - 407 RobotStudio S4
 - 1.8K Developer Tools
 - 250 ScreenMaker
 - 2.9K Robot Controller
 - 363 IRC5
 - 81 OmniCore
 - 8 RCS (Realistic Controller Simulation)
 - 853 RAPID Programming
 - 31 AppStudio
 - 4 RobotStudio AR Viewer
 - 19 Wizard Easy Programming
 - 110 Collaborative Robots
 - 5 Job listings
 
