示例#1
0
	Exec_stat exec(MCExecPoint& ep)
	{
		if (m_noun -> eval(ep) != ES_NORMAL)
			return ES_ERROR;

		MCInternalMethod *t_method;
		t_method = NULL;
		for(int n = 0; n < s_internal_method_count; ++n)
			if (ep . getsvalue() == s_internal_methods[n] . name)
			{
				t_method = &s_internal_methods[n];
				break;
			}

		if (t_method == NULL)
		{
			MCeerror -> add(EE_PUT_CANTSET, line, pos);
			return ES_ERROR;
		}

		void *t_value;
		t_method -> pointer(&t_value);
		if (internal_get_value(ep, t_method -> return_type, t_value) != ES_NORMAL)
			return ES_ERROR;

		return MCresult -> store(ep, False);
	}
    void exec_ctxt(MCExecContext &ctxt)
    {
#ifdef LEGACY_EXEC
        if (m_noun -> eval(ep) != ES_NORMAL)
            return ES_ERROR;

		MCInternalMethod *t_method;
		t_method = NULL;
		for(int n = 0; n < s_internal_method_count; ++n)
            if (ep . getsvalue() == s_internal_methods[n] . name)
			{
				t_method = &s_internal_methods[n];
				break;
			}

		if (t_method == NULL)
		{
            MCeerror -> add(EE_PUT_CANTSET, line, pos);
            return ES_ERROR;
		}

		void *t_value;
        t_method -> pointer(&t_value);
        if (internal_get_value(ep, t_method -> return_type, t_value) != ES_NORMAL)
            return ES_ERROR;

        return MCresult -> set(ep);
#endif
	}