.NET/Link API Version 1.6 USE FRAMES

IMathLink.CheckFunction Method 

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

[Visual Basic]
Function CheckFunction( _
   ByVal f As String _
) As Integer
[C#]
int CheckFunction(
   string f
);

Parameters

f
The function name that you are expecting.

Return Value

The argument count of the incoming function.

Remarks

If the incoming function is not the specified one, 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 is not what you expect.

Exceptions

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

See Also

IMathLink Interface | Wolfram.NETLink Namespace | CheckFunctionWithArgCount | GetFunction