get procedure?

2010-02-17 Thread Paul Emsley
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,

Re: get procedure?

2010-02-17 Thread Thomas Thiriez
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

Re: get procedure?

2010-02-17 Thread dsmich
Thomas Thiriez tho...@twistedwave.com wrote: 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);

Re: get procedure?

2010-02-17 Thread Andy Wingo
Hi, On Wed 17 Feb 2010 20:03, Thomas Thiriez tho...@twistedwave.com writes: Here is what you should use for xxx: Hm, not quite :) SCM FindFunc(const char *funcName) { SCM funcSymbol = scm_c_lookup(funcName); scm_c_lookup gives you a variable object, as you note below; better to call it