Re: scm_defined_p(sym, env)

2011-08-23 Thread Andreas Rottmann
Richard Shann writes: > I didn't find the SCM_UNBNDP() that you mention but since mailing the > list I stumbled on SCM_UNDEFINED and tried > if(opt==SCM_UNDEFINED) ... > and that seems to work. > IIRC, that this works is not actually guaranteed (it depends on the type of the SCM values; that ty

Re: Reader syntax for accessing arrays

2011-08-23 Thread Panicz Maciej Godek
> Hi Maciej, > I've been thinking among the same lines. At the same time this syntax could > be used to access members of a 'struct' or 'class' object. It should be > relatively simple to write a small interpreter (or maybe a pre-compiler). I thought that maybe it could be achieved using the guile

various updates

2011-08-23 Thread Andy Wingo
Hi, Quick update: g-wrap and guile-gnome from their master branches should work well together, and with Guile 2.0. They still don't compile .go files though. Guile-lib now installs (texinfo nodal-tree), allowing Guile-present's texinfo support, now hosted on gitorious, to work with Guile 2.0. G

Re: scm_defined_p(sym, env)

2011-08-23 Thread Richard Shann
I didn't find the SCM_UNBNDP() that you mention but since mailing the list I stumbled on SCM_UNDEFINED and tried if(opt==SCM_UNDEFINED) ... and that seems to work. So (unless I am doing something bad) I think I am back on course - thanks! Richard On Tue, 2011-08-23 at 13:54 +0200, r...@tuxteam

Re: scm_defined_p(sym, env)

2011-08-23 Thread rm
On Tue, Aug 23, 2011 at 12:36:44PM +0100, Richard Shann wrote: > I have defined a function with one needed and one optional arg, using > > scm_c_define_gsubr (name, 2, 0, 0, callback); > > in my function I need to test if the second argument is present, it > looks like I need > > scm_defined_p(s

scm_defined_p(sym, env)

2011-08-23 Thread Richard Shann
I have defined a function with one needed and one optional arg, using scm_c_define_gsubr (name, 2, 0, 0, callback); in my function I need to test if the second argument is present, it looks like I need scm_defined_p(sym, env) but, if so, how do I find the value of env for the top-level environm

Re: Reader syntax for accessing arrays

2011-08-23 Thread Johan Hidding
Hi Maciej, I've been thinking among the same lines. At the same time this syntax could be used to access members of a 'struct' or 'class' object. It should be relatively simple to write a small interpreter (or maybe a pre-compiler). Otherwise you could make a wrapper around the array in the form of