Richard Shann <[email protected]> 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 type might not have defined/reasonable behavior
wrt. the "==" operator, so the right way to write the above comparison
would be `scm_is_eq(opt, SCM_UNDEFINED)', and incidentially, this is how
SCM_UNBNDP() is defined (see libguile/tags.h, at least on Guile 2.0).

> So (unless I am doing something bad) I think I am back on course -
> thanks!
>
The idiom you used may work for you now, but may be broken at any time,
or even when compiling Guile with a different configuration (search for
SCM_DEBUG_TYPING_STRICTNESS in libguile/tags.h for illustration).

HTH, Rotty

PS: Please consider avoiding top-posts (see for instance
<http://www.usenet-replayer.com/faq/alt.games.generals.html> for a
rationale).
-- 
Andreas Rottmann -- <http://rotty.yi.org/>

Reply via email to