How can I define optional and mandatory input values for methods?
0
Hello, how can I define optional inputs and mandatory inputs of a method? For example this method: METHOD Test VAR_INPUT inputMandatory : INT; inputOptional : INT := 10; END_VAR // Do something ; END_METHOD But if I call this method in this way "THIS.Test()", the compiler don't recognize that the first input is not optional and it will be needed. How can I declare it, that I have to fill the first input? Regards
asked
Timo Rütters
1 answers
0
Currently the only way to handle this type of requirement is to add the checks in the java code amnually and handle the exceptions in you own logic. Maybe throw an error and catch the error with error handling on the call java action activity.