MLMessageReady (C 函数)

MLMessageReady 已经被 WSMessageReady 所取代.

int MLMessageReady(MLINK link)

查询链接对象 link,看链接是否有带外消息.

更多信息

  • MLMessageReady() 返回非零值如果消息可以读取,否则为零.
  • MLMessageReady() 在 MathLink 标头文件 mathlink.h 中被声明.

范例

基本范例  (1)

#include "mathlink.h"

/* calculate the sum of the integers in a list and check for a message on a link */

int f(MLINK lp, int *list, int len)
{
    int sum;
    while(len--)
    {
        sum += *list++;
        if(MLMessageReady(lp))
            { /* read the message */ }
    }

    return sum;
}