This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: Accessing Scheme lists in C?
- To: ian dot pointer at btinternet dot com
- Subject: Re: Accessing Scheme lists in C?
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 25 Aug 2000 22:33:45 +0200
- Cc: guile at sources dot redhat dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <XFMail.000825193542.ian.pointer@btinternet.com>
- Reply-To: djurfeldt at nada dot kth dot se
Ian Pointer <ian.pointer@btinternet.com> writes:
> Sorry if this seems to be a silly query, but I've decided to use guile as a
> scripting language to a little computer game I'm writing, and I was wondering
> just how a C function can access the contents of a list passed to it. I can't
> find anything suitable in gh.h, and the documentation I can find is rather
> vague on the subject. Thanks...
Use the selectors SCM_CAR and SCM_CDR and the predicates SCM_NULLP and
SCM_CONSP (which corresponds to `pair?').