[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get procedure?
From: |
Thomas Thiriez |
Subject: |
Re: get procedure? |
Date: |
Wed, 17 Feb 2010 20:03:57 +0100 |
Hi Paul,
Here is what you should use for xxx:
SCM FindFunc(const char *funcName)
{
SCM funcSymbol = scm_c_lookup(funcName);
if (!funcSymbol)
// undefined symbol
return 0;
return scm_variable_ref(funcSymbol);
}
Regards,
Thomas
On Feb 17, 2010, at 7:25 PM, Paul Emsley wrote:
>
> I don't understand what xxx is. Can you help? (Bit of a noob question, I
> feel).
>
> SCM rest = SCM_EOL;
> SCM arg_list = SCM_EOL;
> arg_list = scm_cons(SCM_MAKINUM(4), arg_list);
> arg_list = scm_cons(SCM_MAKINUM(1), arg_list);
>
> SCM func = xxx("-");
>
> SCM v = scm_apply_1(func, arg_list, rest);
> // Now v should be a scheme int 3
>
> Thanks,
>
> Paul.
>
>
>