MLNextPacket (C 函数)

MLNextPacket 已经被 WSNextPacket 所取代.

int MLNextPacket(MLINK link)

进入 link 中下一个包并返回一个常量表明它的标头.

更多信息

范例

基本范例  (1)

#include "mathlink.h"

/* read the type of the incoming packet on a link */

void f(MLINK lp)
{
    switch(MLNextPacket(lp))
    {
        case CALLPKT:
            /* read the CallPacket[] */
            break;
        case EVALUATEPKT:
            /* read the EvaluatePacket[] */
            break;
        case RETURNPKT:
            /* read the EvaluatePacket[] */

        /* ... */

        case ILLEGALPKT:
            /* unable to read the next packet from lp */
    }    
}