.NET/Link API Version 1.7 USE FRAMES

IMathLink.CheckFunctionWithArgCount Method 

Reads a function name and argument count and requires that it match the specified function name and arg count.

[Visual Basic]
Sub CheckFunctionWithArgCount( _
   ByVal f As String, _
   ByVal argCount As Integer _
)
[C#]
void CheckFunctionWithArgCount(
   string f,
   int argCount
);

Parameters

f
The function name that you are expecting.
argCount
The argument count that you are expecting.

Remarks

If the incoming function is not the specified one, or it does not have the specified number of arguments, a MathLinkException is thrown.

This method is similar to GetFunction in that it reads the name and argument count off the link. Use it in situations where you want an error to occur if the function and argument count are not what you expect.

Exceptions

Exception TypeCondition
MathLinkExceptionIf the data waiting on the link is not the named function with the named arg count, or on any other MathLink error.

See Also

IMathLink Interface | Wolfram.NETLink Namespace | CheckFunction | GetFunction