next up previous
Next: 4.4 cond Up: 4.3 Car, Cdr Previous: 4.3.3 append

4.3.4 member


LVAL xmember()
{
    LVAL x,list,fcn,val;
    int tresult;

    /* protect some pointers */
    xlsave1(fcn);

    /* get the expression to look for and the list */
    x = xlgetarg();
    list = xlgalist();
    xltest(&fcn,&tresult);

    /* look for the expression */
    for (val = NIL; consp(list); list = cdr(list))
        if (dotest2(x,car(list),fcn) == tresult) {
            val = list;
            break;
        }

    /* restore the stack */
    xlpop();

    /* return the result */
    return (val);
}
xltestは:testや:test-notキーワード引数を得るたえもの ものです.(xlsubr.c)

generated through LaTeX2HTML. M.Inaba 平成18年5月6日