OS. Function Return Value
Most OpenSTAAD functions return a value to either:
- indicate the success or failure of the function (a Boolean result), or
- results value of the function (a numeric value result).
If a function returns a Boolean result and that return value for an OpenSTAAD function is equal to 0 (zero), it means that OpenSTAAD was unable to execute the function. If you see this result, check that you have passed all the required parameters to the function. Make sure that all parameters being passed are valid. A return value of 1 (one) indicates that OpenSTAAD successfully executed the function.
Unless specified otherwise, results returned by a function are stored in variable names passed to it for the purpose.
A few of the OpenSTAAD Application functions return the results as the return value of the function. In those cases, the above comments regarding the function return value do not apply.
If a function returns the value of the function,
Dim returnValue returnValue = objOpenSTAAD.BooleanReturn (param1, param2, … ,paramn)