Member of the support class.
c = nargout
Returns the number of output arguments you request from the function that calls nargout. You can use nargout to determine if the number of outputs you request from a function is less than the maximum number of outputs for that function. You then can bypass the calculation of the unrequested outputs. If you attempt to call nargout outside of a user-defined function, MathScript always returns 0.
| Name | Description |
| c | Returns the number of output arguments you request from the function that calls nargout. c is an integer. |
Save the following script as integerdivision.m in the LabVIEW Data directory. The script uses nargout to determine if the number of outputs you request from integerdivision is greater than 1. If you request less than two outputs from integerdivision, LabVIEW bypasses the calculation of the remainder output.
function [quotient, remainder] = integerdivision(dividend, divisor)After you save integerdivision.m, call the following commands in the LabVIEW MathScript Window or the MathScript Node.
[x, y] = integerdivision(14, 3)