示例#1
0
文件: NewtFns.c 项目: pablomarx/NEWT0
newtRef NsSymbolCompareLex(newtRefArg rcvr, newtRefArg r1, newtRefArg r2)
{
	if (! NewtRefIsSymbol(r1))
        return NewtThrow(kNErrNotASymbol, r1);

	if (! NewtRefIsSymbol(r2))
        return NewtThrow(kNErrNotASymbol, r2);

    return NewtMakeInteger(NewtSymbolCompareLex(r1, r2));
}
示例#2
0
文件: NewtEnv.c 项目: morgant/NEWT0
newtRef NsDefNamedMP(newtRefArg rcvr, newtRefArg r, newtRefArg v)
{
	newtRefVar	sym;

	if (NewtRefIsNamedMP(r))
	{
		sym = NewtMPToSymbol(r);
	}
	else if (NewtRefIsSymbol(r))
	{
		sym = r;
	}
	else
	{
		return r;
	}

    return NcSetSlot(NAMED_MPS, sym, v);
}
示例#3
0
文件: NewtFns.c 项目: pablomarx/NEWT0
newtRef NsIsSymbol(newtRefArg rcvr, newtRefArg r)
{
    return NewtMakeBoolean(NewtRefIsSymbol(r));
}